Skip to content

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Feb 10, 2026

Summary

Updates pandas.md and pandas_panel.md lectures for compatibility with pandas 3.0 (What's New).

Changes

pandas_panel.md

  • Remove future_stack=True from all .stack() calls -- now the default in pandas 3.0
  • Remove outdated comments like # future_stack=True is required until pandas>3.0
  • Update text about groupby axis support from "deprecated" to "removed" (fully removed in 3.0)

pandas.md

  • Fix df.where() example -- changed df.where(df.POP >= 20000, False) to df.where(df.POP >= 20000). In pandas 3.0, string columns use the new str dtype which cannot hold non-string values like False.

environment.yml

  • Add pandas>=3 as an explicit dependency since it is not included in anaconda=2025.12

Confirmed Compatible (no changes needed)

  • df.map() already used (removed applymap not present)
  • .loc[] assignments are Copy-on-Write safe
  • No deprecated frequency aliases (M, H, etc.) used
  • .groupby() already uses .T.groupby() pattern
  • pct_change() does not use removed limit param

- 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)
@mmcky mmcky changed the title Update lectures for pandas 3.0 compatibility [pandas, pandas_panel] Update lectures for pandas 3.0 compatibility Feb 10, 2026
Conda doesn't have pandas 3.0 in default channel yet, so installing via pip.
@github-actions
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant