stumpy-dev/stumpy

warning in tutorial

Closed this issue · 0 comments

Noticed the following warning in the tutorial webpage:

/tmp/ipykernel_848/748043925.py:3: FutureWarning: errors='ignore' is deprecated and will raise in a future version. Use to_datetime without passing errors and catch exceptions explicitly instead
taxi_df['timestamp'] = pd.to_datetime(taxi_df['timestamp'], errors='ignore')
/tmp/ipykernel_848/748043925.py:3: UserWarning: Could not infer format, so each element will be parsed individually, falling back to dateutil. To ensure parsing is consistent and as-expected, please specify a format.
taxi_df['timestamp'] = pd.to_datetime(taxi_df['timestamp'], errors='ignore')

We can do taxi_df['timestamp'] = pd.to_datetime(taxi_df['timestamp'], format='mixed'), and that should resolve it. Better to check other tutorials to find other cases and apply the same change in those places as well.