knubez / TAMS

TAMS
https://tams.readthedocs.io/
MIT License
21 stars 6 forks source link

pandas warning about `.apply(sum)` #21

Open zmoon opened 5 months ago

zmoon commented 5 months ago

https://github.com/knubez/TAMS/blob/0b74da8871e2ac16146ab7c714f86ba4d16d9600/tams/core.py#L799

May be able to just use .sum() instead. Or pandas suggests switching to .apply('np.sum') to keep the current behavior.

zmoon commented 3 months ago

Also seeing a corresponding warning with this in some envs:

numpy/core/fromnumeric.py:86: FutureWarning: The behavior of DataFrame.sum with axis=None is deprecated, in a future version this will reduce over both axes and return a scalar. To retain the old behavior, pass axis=0 (or do not pass axis)

which seems to be really a pandas 2 thing.