soft-matter / trackpy

Python particle tracking toolkit
http://soft-matter.github.io/trackpy
Other
443 stars 131 forks source link

pandas 2.0 breaks emsd calculation #730

Closed yichechang closed 1 year ago

yichechang commented 1 year ago

Keyword argument level for aggregation methods of DataFrame or Series (e.g., .mean) has been removed from pandas 2.0 release in favor of explicitly using .groupby operation. This has however breaks at least trackpy.motion.emsd.

Perhaps limiting trackpy's pandas dependency to be < 2 before rewriting these methods with groupby?

yichechang commented 1 year ago

From pandas 2.0.0 release notes:

Removed the level keyword in DataFrame and Series aggregations; use groupby instead (GH39983)

yichechang commented 1 year ago

I believe #738 points to the same issue and there are some discussions. I'll close this issue.