Skip to content

Conversation

@EwoutH
Copy link
Collaborator

@EwoutH EwoutH commented Dec 28, 2025

Pandas 3.0 now infers string columns as the dedicated string dtype instead of object dtype by default. This caused get_limits() to fail recognizing categorical columns, returning individual values instead of sets of unique values.

The fix adds a check for string dtype using pd.api.types.is_string_dtype() alongside the existing object dtype check, ensuring categorical/string columns are properly handled regardless of pandas version.

Fixes test failures in test_get_limits and test_plot when using pandas 3.0.0rc1 (--pre flag).

This issue was detected by our pre-release CI run. I think this warrants a backport to 2.5.x and maybe a patch release.

@EwoutH EwoutH requested a review from quaquel December 28, 2025 14:24
@EwoutH EwoutH added the bug label Dec 28, 2025
@coveralls
Copy link

coveralls commented Dec 28, 2025

Coverage Status

coverage: 92.671%. remained the same
when pulling 9886c8d on fix_get_limits_pd3
into ac79c1a on master.

Pandas 3.0 now infers string columns as the dedicated string dtype instead of object dtype by default. This caused get_limits() to fail recognizing categorical columns, returning individual values instead of sets of unique values.

The fix adds a check for string dtype using pd.api.types.is_string_dtype() alongside the existing object dtype check, ensuring categorical/string columns are properly handled regardless of pandas version.

Fixes test failures in test_get_limits and test_plot when using pandas 3.0.0rc1 (--pre flag).
@EwoutH EwoutH force-pushed the fix_get_limits_pd3 branch from 94475ef to 9886c8d Compare December 28, 2025 14:48
@EwoutH EwoutH changed the title parcoords.py: Fix get_limits compatibility with pandas 3.0 parcoords.py: Fix get_limits compatibility with pandas 3.0 string dtype Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants