Skip to content

Modernise to pandas 3, Python 3.14, and kaleido 1.3#68

Open
hmgaudecker wants to merge 3 commits into
mainfrom
2026-dependency-bump
Open

Modernise to pandas 3, Python 3.14, and kaleido 1.3#68
hmgaudecker wants to merge 3 commits into
mainfrom
2026-dependency-bump

Conversation

@hmgaudecker

@hmgaudecker hmgaudecker commented Jul 3, 2026

Copy link
Copy Markdown
Member

Modernises all environments and removes the pandas option boilerplate that pandas 3.0 makes obsolete.

Dependencies

Across the root pyproject.toml, the toy-example pyproject.toml files under python_installation_execution/, and the two conda environment.yml files:

  • pandas >= 3 (lifts the old >=2.3,<3 cap)
  • python ~= 3.14.0 / requires-python >= 3.14
  • plotly >= 6.1.1, pyarrow >= 13
  • pypi kaleido replaced by conda python-kaleido >= 1.3.0

Boilerplate removal

pandas 3.0 enables Copy-on-Write and a pyarrow-backed default string dtype automatically, so pd.options.mode.copy_on_write = True and pd.options.future.infer_string are removed from every example notebook, clean_data.py, and the what_is_pandas slide deck (pd.options.plotting.backend = "plotly" is kept). The what_is_pandas and inspecting_and_summarizing doc blocks are rewritten to state the 3.0 defaults. One genuine pandas 3.0 fix: dataframe_examples.ipynb casts to object before assigning a string ellipsis row to numeric columns, which 3.0 now rejects.

Verification

pixi install solves cleanly on Python 3.14 (pandas 3.0.3, pyarrow 24.0.0, plotly 6.4.0, python-kaleido 1.3.0); the default string dtype is confirmed pyarrow-backed. All 152 example notebooks were executed directly via nbconvert and 151 pass (the one exception is a standalone authoring utility that copies to the clipboard and cannot run headless on any pandas version). The npx slidev export PDF tasks fail in this sandbox because it blocks the npm registry; that is environmental and unrelated to these changes.

Recorded screencasts affected

Source slides were corrected where possible, but four recorded decks show now-stale content and are tracked in separate re-record issues: pandas/what_is_pandas (teaches enabling the removed options), plotting/why_plotly_prerequisites (kaleido "ships a browser" framing), and python_installation_execution/pixi_and_conda_forge + pixi_modifying_environments (show Python 3.13). pandas/imperative_data_cleaning is a deletion candidate pending the maintainers' decision (still wired into pandas/config.py).

🤖 Generated with Claude Code


Follow-up: boilerplate + tooling

  • .ai-instructions submodule added (HTTPS), wired via AGENTS.md (tier-b-course + pytask) with CLAUDE.md as a pointer.
  • prek replaces classic pre-commit on this branch; prek autoupdate bumped hook revs; the forbid-submodules hook removed so the submodule is allowed.
  • ty added as a prek hook ([tool.ty] keeps the existing rules, gains environment.python) plus a run-ty CI job. It is red on 17 pre-existing diagnostics (11 in numerical_optimization/task_plots.py, the rest in task_create_book.py/config.py), left for triage.
  • CI added (main.yml, build + run-ty) pinned to pixi-version: v0.72.0; pixi.lock refreshed; [tool.ruff] target-version bumped to py314.

hmgaudecker and others added 2 commits July 3, 2026 10:14
…nts.

Bump pandas to >=3, python to ~=3.14.0 (and requires-python to >=3.14), and
replace the plain pypi kaleido with conda-forge python-kaleido>=1.3.0, which
drops the old per-platform pin for the broken Windows kaleido 0.1.0.post1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Since pandas 3.0, Copy-on-Write and the pyarrow-backed default string dtype
are enabled automatically, so the copy_on_write and infer_string options are
removed from example notebooks, scripts, and slides (the plotly plotting
backend stays). Cast to object before inserting the "..." ellipsis row in the
dataframe display examples, which pandas 3.0 no longer accepts on numeric
columns.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Add the .ai-instructions submodule over HTTPS and wire it in through AGENTS.md
(tier-b-course profile plus the pytask module) with CLAUDE.md pointing at it.
Run ty as a prek hook resolving imports from the pixi env, migrate the hook
runner from pre-commit to prek, refresh the pinned hook revisions, and add a
GitHub Actions workflow that builds the pages and runs ty, both on pixi 0.72.0.

ty currently reports 17 pre-existing diagnostics; the hook is added now and the
findings are left for a separate triage pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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