You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello guys,
I am starting to convert some of my codes from pandas to dask because the dataframe become bigger than my memory. One of my firt issues is to handle how to filter a dask dataframe by a datetime/timestamp value.
My question may seems dumb but I coulnd´t find any solution yet.
Creating a sample padas dataframe and converting to dask daframe
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello guys,
I am starting to convert some of my codes from pandas to dask because the dataframe become bigger than my memory. One of my firt issues is to handle how to filter a dask dataframe by a datetime/timestamp value.
My question may seems dumb but I coulnd´t find any solution yet.
Creating a sample padas dataframe and converting to dask daframe
Now I try to filter it.
df.loc[df['date'].dt.date >= date(2023,6,1)].compute()
But it fail
I does work if I try to filter by the datetime values.
df.loc[df['datetime'] >= datetime(2023,6,1)].compute()
Beta Was this translation helpful? Give feedback.
All reactions