Skip to content

Commit 9d40f2b

Browse files
authored
Merge branch 'pandas-dev:main' into main
2 parents 32b4aa6 + 4257ad6 commit 9d40f2b

File tree

24 files changed

+113
-54
lines changed

24 files changed

+113
-54
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ body:
2626
label: Reproducible Example
2727
description: >
2828
Please follow [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) on how to
29-
provide a minimal, copy-pastable example.
29+
provide a minimal, copy-pastable example. Reports without reproducible examples will generally be closed
30+
until they are provided.
3031
placeholder: >
3132
import pandas as pd
3233

.github/ISSUE_TEMPLATE/documentation_improvement.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ body:
2828
attributes:
2929
label: Documentation problem
3030
description: >
31-
Please provide a description of what documentation you believe needs to be fixed/improved
31+
Please provide a description of what documentation you believe needs to be fixed/improved.
32+
Reports without a clear, actionable request will generally be closed.
3233
validations:
3334
required: true
3435
- type: textarea

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ body:
2121
attributes:
2222
label: Problem Description
2323
description: >
24-
Please describe what problem the feature would solve, e.g. "I wish I could use pandas to ..."
24+
Please describe what problem the feature would solve, e.g. "I wish I could use pandas to ...".
25+
Reports without a clear, actionable request will generally be closed.
2526
placeholder: >
2627
I wish I could use pandas to return a Series from a DataFrame when possible.
2728
validations:

.github/ISSUE_TEMPLATE/performance_issue.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ body:
2525
description: >
2626
Please provide a minimal, copy-pastable example that quantifies
2727
[slow runtime](https://docs.python.org/3/library/timeit.html) or
28-
[memory](https://pypi.org/project/memory-profiler/) issues.
28+
[memory](https://pypi.org/project/memory-profiler/) issues. Reports
29+
without reproducible examples will generally be closed
30+
until they are provided.
2931
validations:
3032
required: true
3133
- type: textarea

doc/source/whatsnew/v3.0.0.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ Other API changes
418418
an empty ``RangeIndex`` or empty ``Index`` with object dtype when determining
419419
the dtype of the resulting Index (:issue:`60797`)
420420
- :class:`IncompatibleFrequency` now subclasses ``TypeError`` instead of ``ValueError``. As a result, joins with mismatched frequencies now cast to object like other non-comparable joins, and arithmetic with indexes with mismatched frequencies align (:issue:`55782`)
421+
- :meth:`ExtensionDtype.construct_array_type` is now a regular method instead of a ``classmethod`` (:issue:`58663`)
421422
- Comparison operations between :class:`Index` and :class:`Series` now consistently return :class:`Series` regardless of which object is on the left or right (:issue:`36759`)
422423
- Numpy functions like ``np.isinf`` that return a bool dtype when called on a :class:`Index` object now return a bool-dtype :class:`Index` instead of ``np.ndarray`` (:issue:`52676`)
423424

@@ -792,6 +793,7 @@ MultiIndex
792793
- Bug in :class:`DataFrame` arithmetic operations in case of unaligned MultiIndex columns (:issue:`60498`)
793794
- Bug in :class:`DataFrame` arithmetic operations with :class:`Series` in case of unaligned MultiIndex (:issue:`61009`)
794795
- Bug in :meth:`MultiIndex.from_tuples` causing wrong output with input of type tuples having NaN values (:issue:`60695`, :issue:`60988`)
796+
- Bug in :meth:`DataFrame.reindex` and :meth:`Series.reindex` where reindexing :class:`Index` to a :class:`MultiIndex` would incorrectly set all values to ``NaN``.(:issue:`60923`)
795797

796798
I/O
797799
^^^

pandas/core/arrays/boolean.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ def kind(self) -> str:
8585
def numpy_dtype(self) -> np.dtype:
8686
return np.dtype("bool")
8787

88-
@classmethod
89-
def construct_array_type(cls) -> type_t[BooleanArray]:
88+
def construct_array_type(self) -> type_t[BooleanArray]:
9089
"""
9190
Return the array type associated with this dtype.
9291

pandas/core/arrays/floating.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ class FloatingDtype(NumericDtype):
2828
_default_np_dtype = np.dtype(np.float64)
2929
_checker = is_float_dtype
3030

31-
@classmethod
32-
def construct_array_type(cls) -> type[FloatingArray]:
31+
def construct_array_type(self) -> type[FloatingArray]:
3332
"""
3433
Return the array type associated with this dtype.
3534

pandas/core/arrays/integer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ class IntegerDtype(NumericDtype):
2828
_default_np_dtype = np.dtype(np.int64)
2929
_checker = is_integer_dtype
3030

31-
@classmethod
32-
def construct_array_type(cls) -> type[IntegerArray]:
31+
def construct_array_type(self) -> type[IntegerArray]:
3332
"""
3433
Return the array type associated with this dtype.
3534

pandas/core/arrays/numeric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def _coerce_to_data_and_mask(
150150
if dtype is not None:
151151
dtype = dtype_cls._standardize_dtype(dtype)
152152

153-
cls = dtype_cls.construct_array_type()
153+
cls = dtype_cls().construct_array_type()
154154
if isinstance(values, cls):
155155
values, mask = values._data, values._mask
156156
if dtype is not None:

pandas/core/arrays/string_.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,7 @@ def construct_from_string(cls, string) -> Self:
283283
else:
284284
raise TypeError(f"Cannot construct a '{cls.__name__}' from '{string}'")
285285

286-
# https://github.com/pandas-dev/pandas/issues/36126
287-
# error: Signature of "construct_array_type" incompatible with supertype
288-
# "ExtensionDtype"
289-
def construct_array_type( # type: ignore[override]
290-
self,
291-
) -> type_t[BaseStringArray]:
286+
def construct_array_type(self) -> type_t[BaseStringArray]:
292287
"""
293288
Return the array type associated with this dtype.
294289

0 commit comments

Comments
 (0)