Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read staypoints csv function cannot deal with NaNs in finished at #366

Open
NinaWie opened this issue Jan 5, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@NinaWie
Copy link
Member

NinaWie commented Jan 5, 2022

I used the function read_staypoints_csv to load staypoints of the Foursquare dataset, after I had saved these staypoints before using write_staypoints_csv. The problem with Foursquare is that there is no information about finished_at. When loading the data, the function tries to transform the dataframe into a tz aware dataframe (see here), but it does not work because the values are NaN. This does not cause an error; but the error appears later when running sp.as_staypoints:

AssertionError: dtype of finished_at is datetime64[ns] but has to be tz aware datetime64

I'm not sure how to fix it in Trackintel, but it's not urgent because I use a workaround locally.

@hongyeehh hongyeehh added the bug Something isn't working label May 9, 2022
@henrymartin1
Copy link
Member

We agreed to set the finished at column as an optional column but not to use NaN values for missing finished_at values for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants