You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Numeric fill_value when loading a DataFrame with a MultiIndex and string columns fail with Pandas >= 3 #1166
It turns out it is because of some data (read from Excel but that's irrelevant) has a multi-index with some missing combination of values (when expanded to an array) and a fill_value not compatible with the dtype of some columns (in the model a fill_value of zero while the column is string). In the user code, the string column is dropped just after reading the array.
It previously worked because Pandas an object dtype for string columns and thus the 0 fill_value worked. This is an ugly issue and I don't really know what's the best way to solve this.
changed the title [-]demo model crashes on Pandas >= 3[/-][+]Numeric fill_value when loading a DataFrame with a MultiIndex and string columns fail with Pandas >= 3[/+]on Mar 6, 2026
The best way to solve this would probably be to implement a "usecols" argument in some (all?) functions and methods involved (read_excel, Range.load(), from_lists and from_frame) but that wouldn't solve the immediate problem.
Activity
gdementen commentedon Mar 6, 2026
It turns out it is because of some data (read from Excel but that's irrelevant) has a multi-index with some missing combination of values (when expanded to an array) and a fill_value not compatible with the dtype of some columns (in the model a fill_value of zero while the column is string). In the user code, the string column is dropped just after reading the array.
Here is an MRE:
It previously worked because Pandas an object dtype for string columns and thus the 0 fill_value worked. This is an ugly issue and I don't really know what's the best way to solve this.
[-]demo model crashes on Pandas >= 3[/-][+]Numeric fill_value when loading a DataFrame with a MultiIndex and string columns fail with Pandas >= 3[/+]gdementen commentedon Mar 6, 2026
The best way to solve this would probably be to implement a "usecols" argument in some (all?) functions and methods involved (read_excel, Range.load(), from_lists and from_frame) but that wouldn't solve the immediate problem.
FIX: MultiIndex+str column with Pandas 3.0 (fixes larray-project#1166)
FIX: MultiIndex+str column with Pandas 3.0 (fixes larray-project#1166)
FIX: MultiIndex+str column with Pandas 3.0 (fixes larray-project#1166)
FIX: MultiIndex+str column with Pandas 3.0 (fixes larray-project#1166)