pastas / pastastore

:spaghetti: :convenience_store: Tools for managing timeseries and Pastas models
https://pastastore.readthedocs.io
MIT License
15 stars 4 forks source link

Error writing pastastore to .zip file #35

Closed OnnoEbbens closed 3 years ago

OnnoEbbens commented 3 years ago

When I run the code in this notebook

I get the following error: ValueError: DataFrame index must be unique for orient='columns'.

when trying to write the pastastore to a .zip file using: store.to_zip('pastasstore.zip', overwrite=True)

dbrakenhoff commented 3 years ago

Duplicate timestamps by any chance?

dbrakenhoff commented 3 years ago

It's because of NaT timestamps in the timeseries.

Calling dropna() when adding the oseries to the pastastore solves the issue.