Commit 9886c8d
committed
parcoords.py: Fix get_limits compatibility with pandas 3.0 string dtype
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).1 parent ac79c1a commit 9886c8d
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | 113 | | |
115 | | - | |
116 | 114 | | |
117 | | - | |
| 115 | + | |
118 | 116 | | |
119 | 117 | | |
120 | 118 | | |
| |||
0 commit comments