We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8598ec2 commit 37cbf25Copy full SHA for 37cbf25
pandas/tseries/index.py
@@ -1202,9 +1202,9 @@ def intersection(self, other):
1202
not other.offset.isAnchored() or
1203
(not self.is_monotonic or not other.is_monotonic)):
1204
result = Index.intersection(self, other)
1205
- if isinstance(result, DatetimeIndex):
1206
- if result.freq is None:
1207
- result.offset = to_offset(result.inferred_freq)
+ result = self._simple_new(result._values, name=result.name, tz=result.tz)
+ if result.freq is None:
+ result.offset = to_offset(result.inferred_freq)
1208
return result
1209
1210
if len(self) == 0:
0 commit comments