standardizedinventories icon indicating copy to clipboard operation
standardizedinventories copied to clipboard

FutureWarning: Update Pandas agg and transform method calls to sum and min

Open dt-woods opened this issue 6 months ago • 0 comments

In stewicombo's overlaphandler.py, there are several agg and a transform method calls that utilize "sum" and "min", which should be called by string version of their function name (see warning messages below).

~/lib/python3.11/site-packages/stewicombo/overlaphandler.py:138: FutureWarning: The provided callable <built-in function sum> is currently using SeriesGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "sum" instead.
  df_dup = df_dup.groupby(cols_intra, as_index=False).agg(funcs_agg)
~/lib/python3.11/site-packages/stewicombo/overlaphandler.py:150: FutureWarning: The provided callable <built-in function min> is currently using SeriesGroupBy.min. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "min" instead.
  .transform(min))

dt-woods avatar Aug 05 '24 17:08 dt-woods