File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2287,15 +2287,18 @@ def numpy_dtype(self) -> np.dtype:
22872287 return np .dtype (str )
22882288 try :
22892289 np_dtype = self .pyarrow_dtype .to_pandas_dtype ()
2290-
2290+
22912291 if isinstance (np_dtype , object ):
22922292 from pandas .core .indexes .interval import IntervalIndex
2293- if hasattr (np_dtype , "categories" ) and isinstance (np_dtype .categories , IntervalIndex ):
2293+
2294+ if hasattr (np_dtype , "categories" ) and isinstance (
2295+ np_dtype .categories , IntervalIndex
2296+ ):
22942297 return np .dtype (object )
2295-
2298+
22962299 if isinstance (np_dtype , DatetimeTZDtype ):
22972300 return np .dtype (f"datetime64[{ np_dtype .unit } ]" )
2298-
2301+
22992302 return np .dtype (np_dtype )
23002303 except (NotImplementedError , TypeError ):
23012304 return np .dtype (object )
You can’t perform that action at this time.
0 commit comments