We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7bcd28 commit d9e29f8Copy full SHA for d9e29f8
pandas/tseries/index.py
@@ -1203,9 +1203,9 @@ def intersection(self, other):
1203
not other.offset.isAnchored() or
1204
(not self.is_monotonic or not other.is_monotonic)):
1205
result = Index.intersection(self, other)
1206
- if isinstance(result, DatetimeIndex):
1207
- if result.freq is None:
1208
- 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)
1209
return result
1210
1211
if len(self) == 0:
0 commit comments