Skip to content

Commit f79ef8a

Browse files
committed
BUG: Fix #61222: Keep index name when resampling with pyarrow dtype
1 parent 04356be commit f79ef8a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/resample.py

+2
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,9 @@ def _wrap_result(self, result):
517517
result.name = getattr(obj, "name", None)
518518

519519
if self._timegrouper._arrow_dtype is not None:
520+
obj = self.obj
520521
result.index = result.index.astype(self._timegrouper._arrow_dtype)
522+
result.index.name = getattr(obj.index, "name", None)
521523

522524
return result
523525

0 commit comments

Comments
 (0)