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
In tutorials/tutorial_AIT_timeseries.ipynb, the dc capacity for each site is added to filtered_prod_data using replace() to map between the site id and the site capacity. However, this implicitly downcasts the column from object dtype to int64. This behavior is deprecated and will be removed in future versions of pandas.
The recommended approach based on the warning is to use pd.option_context(future.no_silent_downcasting, True) and then cast the column's dtype manually. However, in later releases of pandas once this behavior becomes standard, this context manager will itself become deprecated according to: https://pandas.pydata.org/docs/reference/api/pandas.describe_option.html
A better approach may be doing the replacement more explicitly via a masking approach, which is still simple and readable and avoids further reworks of this code with updates to pandas.
The text was updated successfully, but these errors were encountered:
See: pandas-dev/pandas#57734
In tutorials/tutorial_AIT_timeseries.ipynb, the dc capacity for each site is added to
filtered_prod_data
usingreplace()
to map between the site id and the site capacity. However, this implicitly downcasts the column fromobject
dtype toint64
. This behavior is deprecated and will be removed in future versions of pandas.The recommended approach based on the warning is to use
pd.option_context(future.no_silent_downcasting, True)
and then cast the column's dtype manually. However, in later releases of pandas once this behavior becomes standard, this context manager will itself become deprecated according to: https://pandas.pydata.org/docs/reference/api/pandas.describe_option.htmlA better approach may be doing the replacement more explicitly via a masking approach, which is still simple and readable and avoids further reworks of this code with updates to pandas.
The text was updated successfully, but these errors were encountered: