We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 468bd03 commit 579874dCopy full SHA for 579874d
pandas/core/internals/blocks.py
@@ -1989,11 +1989,9 @@ class DatetimeTZBlock(DatetimeLikeBlock):
1989
_validate_ndim = True
1990
_can_consolidate = False
1991
1992
- def values_for_json(self) -> np.ndarray:
1993
- # force dt64tz to go through object dtype
1994
- # tz info will be lost when converting to
1995
- # dt64 which is naive
1996
- return self.values.astype(object)
+ # Don't use values_for_json from DatetimeLikeBlock since it is
+ # an invalid optimization here(drop the tz)
+ values_for_json = NDArrayBackedExtensionBlock.values_for_json
1997
1998
1999
class ObjectBlock(NumpyBlock):
0 commit comments