read_csv with MultiIndex on columns doesn't respect level's dtypes #11728
Labels
Dtype Conversions
Unexpected or buggy dtype conversions
Duplicate Report
Duplicate issue or pull request
IO CSV
read_csv, to_csv
MultiIndex
I want to store a dataframe with hierarchical column index in a CSV. The index contains both string and integer levels. If I'm correct this should be done like that:
As mentioned, the assertion fails. The problem is that in
read_df
, the second level ('numeric') contains strings ('0', '1', '2') instead of numbers.Versions:
The text was updated successfully, but these errors were encountered: