Skip to content

Commit 67f55f3

Browse files
authored
simplified if statements
1 parent ae52904 commit 67f55f3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/core/dtypes/dtypes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,9 +2282,7 @@ def numpy_dtype(self) -> np.dtype:
22822282
# regardless of the pyarrow timestamp units.
22832283
# This can be removed if/when pyarrow addresses it:
22842284
# https://github.com/apache/arrow/issues/34462
2285-
if self.pyarrow_dtype.tz is not None:
2286-
np.dtype(self.pyarrow_dtype.to_pandas_dtype())
2287-
else:
2285+
if self.pyarrow_dtype.tz is None:
22882286
return np.dtype(f"datetime64[{self.pyarrow_dtype.unit}]")
22892287
if pa.types.is_duration(self.pyarrow_dtype):
22902288
# pa.duration(unit).to_pandas_dtype() returns ns units

0 commit comments

Comments
 (0)