[pandas, pandas_panel] Update lectures for pandas 3.0 compatibility #470
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Updates
pandas.mdandpandas_panel.mdlectures for compatibility with pandas 3.0 (What's New).Changes
pandas_panel.mdfuture_stack=Truefrom all.stack()calls -- now the default in pandas 3.0# future_stack=True is required until pandas>3.0groupbyaxis support from "deprecated" to "removed" (fully removed in 3.0)pandas.mddf.where()example -- changeddf.where(df.POP >= 20000, False)todf.where(df.POP >= 20000). In pandas 3.0, string columns use the newstrdtype which cannot hold non-string values likeFalse.environment.ymlpandas>=3as an explicit dependency since it is not included inanaconda=2025.12Confirmed Compatible (no changes needed)
df.map()already used (removedapplymapnot present).loc[]assignments are Copy-on-Write safeM,H, etc.) used.groupby()already uses.T.groupby()patternpct_change()does not use removedlimitparam