pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
42.57k stars 17.56k forks source link

BUG: chokes on pd.DatetimeTZDtype if there are no rows. #59123

Closed pcorpet closed 1 day ago

pcorpet commented 3 days ago

This is a follow up to #41875

mroeschke commented 3 days ago

Is there an issue open for this?

pcorpet commented 3 days ago

I'd welcome some help to understand where/how to add a proper test. I have added a simple repro (3 lines) in the bug

mroeschke commented 3 days ago

If you could add a unit test in pandas/tests/reshape/test_pivot.py that mimics your reproducer that would be great

mroeschke commented 1 day ago

Thanks @pcorpet