Fix warning due to timezone aware pandas index#531
Fix warning due to timezone aware pandas index#531RobbieKiwi wants to merge 18 commits intoPyPSA:masterfrom
Conversation
|
Maybe it would be easier to disallow timezone indexes entirely. There are some other issues that can pop up (for example when adding tz-aware data to non tz aware data) that lead to an error with numpy not understanding the datetime[ns, UTC] type when it tries to join the data |
FabianHofmann
left a comment
There was a problem hiding this comment.
great @RobbieKiwi ; any chance we can generalize to multi-dim case?
|
I added a check for the multi-dimensional case. |
Closes #451
Changes proposed in this Pull Request
Previously a timezone-aware datetime index coordinate would get converted into integers before comparison, resulting in a warning that the index does not match the pandas index.
Now there is special logic to handle this case that makes sure the coord is compared correctly.
Note this will only work in the 1D case
Checklist
doc.doc/release_notes.rstof the upcoming release is included.