We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 883224f commit 4a28d12Copy full SHA for 4a28d12
pandas/io/formats/format.py
@@ -947,7 +947,7 @@ def _format(x):
947
if self.na_rep is not None and is_scalar(x) and isna(x):
948
if x is None:
949
return 'None'
950
- elif x is NaT or is_null_datetimelike(x):
+ elif x is NaT or (is_null_datetimelike(x) and not np.isnan(x)):
951
return 'NaT'
952
return self.na_rep
953
elif isinstance(x, PandasObject):
0 commit comments