Skip to content

Commit 5a4cd67

Browse files
committed
request from pandas-dev#30336
1 parent a33a55b commit 5a4cd67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/arrays/datetimes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,8 @@ def _add_offset(self, offset):
802802
PerformanceWarning,
803803
)
804804
result = self.astype("O") + offset
805-
if len(self) == 0:
806-
# _from_sequence won't be able to infer self.tz
805+
if not len(self):
806+
# GH#30336 _from_sequence won't be able to infer self.tz
807807
return type(self)._from_sequence(result).tz_localize(self.tz)
808808

809809
return type(self)._from_sequence(result, freq="infer")

0 commit comments

Comments
 (0)