[pandas, pandas_panel] Update lectures for pandas 3.0 compatibility#470
Open
[pandas, pandas_panel] Update lectures for pandas 3.0 compatibility#470
Conversation
- Remove future_stack=True from .stack() calls (now default in pandas 3.0) - Update groupby axis text from 'deprecated' to 'removed' - Fix df.where() example to avoid str dtype conflict with non-string replacement - Add pandas>=3 to environment.yml (not included in anaconda=2025.12)
Conda doesn't have pandas 3.0 in default channel yet, so installing via pip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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