Skip to content

Add pandas 3.0 support#448

Merged
e-lo merged 10 commits intomainfrom
feature/437-pandas-3-upgrade
Mar 27, 2026
Merged

Add pandas 3.0 support#448
e-lo merged 10 commits intomainfrom
feature/437-pandas-3-upgrade

Conversation

@e-lo
Copy link
Copy Markdown
Collaborator

@e-lo e-lo commented Feb 10, 2026

Summary

Adds full compatibility with pandas 3.0 while maintaining backwards compatibility with pandas 2.x.

Closes #437 and #441

Code Changes

  • __init__.py: Set pd.options.future.infer_string = False to use object dtype for strings (maintains pandera compatibility)
  • io_table.py: Fix geopandas to_json() pyarrow compatibility with reset_index(drop=True)
  • data.py: Fix reset_index() column naming for named RangeIndex (pandas 3.0 behavior change)
  • edit_property.py: Don't set in_crs to None explicitly (let pandera use default value)

Dependency Updates

  • Python >=3.10 (required by geopandas 1.1.2)
  • geopandas >=1.1.2 (pandas 3.0 compatibility)
  • pandera >=0.29.0 (pandas 3.0 compatibility, without geopandas extra)

Test Updates

  • test_transit_prop_changes.py: Handle pandas 3.0 stricter type coercion by converting columns to object dtype before assigning string values

CI Updates

  • Added pandas version matrix to test both pandas 2.x and 3.x
  • Test matrix: Python (3.10, 3.11, 3.12, 3.13) × Pandas (2, 3) = 8 combinations

🤖 Generated with Claude Code

e-lo and others added 7 commits February 6, 2026 11:51
Add explicit type casting, .copy() calls, and updated API usage to resolve
deprecation warnings and SettingWithCopyWarning issues across roadway, transit, and utility modules.
- Set pd.options.future.infer_string = False to use object dtype
  for strings, maintaining compatibility with pandera
- Fix geopandas to_json() pyarrow compatibility with reset_index
- Update geopandas minimum version to 1.1.2 for pandas 3.0 support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix reset_index() behavior with named RangeIndex in pandas 3.0
- Remove explicit None assignment for in_crs (let pandera use default)
- Update tests for pandas 3.0 stricter type coercion
- Update dependency versions: Python >=3.10, geopandas >=1.1.2, pandera >=0.29.0
- Remove geopandas extra from pandera (installed separately)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Test matrix now includes:
- Python: 3.10, 3.11, 3.12, 3.13
- Pandas: 2 (>=2.2.3,<3.0) and 3 (>=3.0.0)

Pandas version is specified during dependency installation to ensure
all packages are resolved with the correct pandas version constraint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix ruff B905 linting errors by adding explicit strict=True parameter
to all zip() calls. This ensures iterables have matching lengths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pandas 3.0 requires Python 3.11+, so exclude that combination.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Comparison

Comparing PR branch to base branch main

No previous benchmark found in base branch. This will serve as the baseline.

Update post-coverage action to download the correct artifact name
`coverage-py3.13-pandas3` after the CI matrix was updated to include
pandas version testing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 12, 2026

Coverage

Tests Skipped Failures Errors Time
255 4 💤 0 ❌ 0 🔥 9m 30s ⏱️

@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Comparison

Comparing PR branch to base branch main

No previous benchmark found in base branch. This will serve as the baseline.

@e-lo e-lo requested review from i-am-sijia and lmz February 12, 2026 19:36
@e-lo e-lo self-assigned this Feb 12, 2026
@e-lo e-lo added the chore A code change that neither fixes a bug nor adds a feature label Feb 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Comparison

Comparing PR branch to base branch main

No previous benchmark found in base branch. This will serve as the baseline.

Copy link
Copy Markdown
Collaborator

@lmz lmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me - thank you!

@e-lo e-lo merged commit 5d09fd6 into main Mar 27, 2026
11 checks passed
@e-lo e-lo deleted the feature/437-pandas-3-upgrade branch March 27, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore A code change that neither fixes a bug nor adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧹 Test and upgrade to Pandas 3.0

2 participants