Skip to content

Drop pandas 1.x support add pandas 3.x support#663

Open
joe-clickhouse wants to merge 3 commits intomainfrom
joe/661-drop-pandas-1x-support
Open

Drop pandas 1.x support add pandas 3.x support#663
joe-clickhouse wants to merge 3 commits intomainfrom
joe/661-drop-pandas-1x-support

Conversation

@joe-clickhouse
Copy link
Contributor

Summary

Pandas 2.0 has been stable since APR 2023 and pandas 3.0 was released in JAN 2026. This PR removes all pandas 1.x compatibility scaffolding and adds pandas 3.x support with minimal new code, but an enhanced set of tests exercising temporal types more thoroughly.

Breaking Changes

  • Minimum pandas version is now 2.0. Users with pandas 1.x will get an error when calling pandas methods. Non-pandas usage is unaffected.
  • Removed the preserve_pandas_datetime_resolution setting. Datetime columns now always return their natural resolution e.g. datetime64[s] for DateTime, datetime64[ms] for DateTime64(3) instead of coercing everything to datetime64[ns].

Changes

  • Removed IS_PANDAS_2, PANDAS_VERSION, pd_extended_dtypes, pd_datetime_res, use_pandas_na which were all dead scaffolding from the 1.x era
  • Simplified all temporal pandas_dtype properties to return natural resolution directly
  • Rewrote the datetime insert path to use vectorized to_numpy(dtype=...) instead of element-by-element .value // nano_divisor which fixes an overflow bug for far-future dates
  • Made necessary but minimal mods to enable pandas 3 compatibility
    • StringDtype null handling
    • Copy-on-Write deprecations
    • pd.NA vs None in nullable columns
  • Replaced pandas 1.x CI job with a pandas 3.x CI job
  • Expanded pandas test coverage

Closes #661, #662

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG

@joe-clickhouse joe-clickhouse linked an issue Mar 4, 2026 that may be closed by this pull request
@joe-clickhouse joe-clickhouse linked an issue Mar 4, 2026 that may be closed by this pull request
@joe-clickhouse joe-clickhouse added hold for 1.0.0 hold off merging until we're ready for 1.0.0 labels Mar 4, 2026
@joe-clickhouse joe-clickhouse self-assigned this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold for 1.0.0 hold off merging until we're ready for 1.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Pandas 3.x support Drop Pandas 1.x support

1 participant