-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Labels
BugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.RegressionFunctionality that used to work in a prior pandas versionFunctionality that used to work in a prior pandas versionTimestamppd.Timestamp and associated methodspd.Timestamp and associated methodsTimezonesTimezone data dtypeTimezone data dtype
Milestone
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample: #34987
Problem description
With #33400 type checks now fasttrack on the kind of the dtype
. Thus for every ExtensionDtype
that is of kind M
, is_datetime64tz_dtype
returns True
. This is then used in get_block_type
which leads to the usage of DatetimeTZBlock
for all of these arrays although this block only supports DatetimeArray
.
pandas/pandas/core/internals/blocks.py
Lines 2685 to 2690 in 4f7d8bb
elif is_datetime64tz_dtype(values.dtype): | |
cls = DatetimeTZBlock | |
elif is_interval_dtype(dtype) or is_period_dtype(dtype): | |
cls = ObjectValuesExtensionBlock | |
elif is_extension_array_dtype(values.dtype): | |
cls = ExtensionBlock |
Metadata
Metadata
Assignees
Labels
BugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.RegressionFunctionality that used to work in a prior pandas versionFunctionality that used to work in a prior pandas versionTimestamppd.Timestamp and associated methodspd.Timestamp and associated methodsTimezonesTimezone data dtypeTimezone data dtype