@@ -213,6 +213,8 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype):
213
213
base = np .dtype ("O" )
214
214
_metadata = ("categories" , "ordered" )
215
215
_cache_dtypes : dict [str_type , PandasExtensionDtype ] = {}
216
+ _supports_2d = False
217
+ _can_fast_transpose = False
216
218
217
219
def __init__ (self , categories = None , ordered : Ordered = False ) -> None :
218
220
self ._finalize (categories , ordered , fastpath = False )
@@ -730,6 +732,8 @@ class DatetimeTZDtype(PandasExtensionDtype):
730
732
_metadata = ("unit" , "tz" )
731
733
_match = re .compile (r"(datetime64|M8)\[(?P<unit>.+), (?P<tz>.+)\]" )
732
734
_cache_dtypes : dict [str_type , PandasExtensionDtype ] = {}
735
+ _supports_2d = True
736
+ _can_fast_transpose = True
733
737
734
738
@property
735
739
def na_value (self ) -> NaTType :
@@ -973,6 +977,8 @@ class PeriodDtype(PeriodDtypeBase, PandasExtensionDtype):
973
977
_cache_dtypes : dict [BaseOffset , int ] = {} # type: ignore[assignment]
974
978
__hash__ = PeriodDtypeBase .__hash__
975
979
_freq : BaseOffset
980
+ _supports_2d = True
981
+ _can_fast_transpose = True
976
982
977
983
def __new__ (cls , freq ) -> PeriodDtype : # noqa: PYI034
978
984
"""
@@ -1435,6 +1441,8 @@ class NumpyEADtype(ExtensionDtype):
1435
1441
"""
1436
1442
1437
1443
_metadata = ("_dtype" ,)
1444
+ _supports_2d = False
1445
+ _can_fast_transpose = False
1438
1446
1439
1447
def __init__ (self , dtype : npt .DTypeLike | NumpyEADtype | None ) -> None :
1440
1448
if isinstance (dtype , NumpyEADtype ):
0 commit comments