Task: Read CSV Columns as Categorical Data Type with Pandas
Task: Read CSV Columns as Categorical Data Type with Pandas: a task in Terminal-Lego-15k (Harbor dataset). When reading CSV files with pandas, you may need to load certain columns directly as categorical data types for memory efficiency and proper data handling. The challenge is that simply…
The task
When reading CSV files with pandas, you may need to load certain columns directly as categorical data types for memory efficiency and proper data handling. The challenge is that simply passing `dtype={column: pandas.Categorical}` to `read_csv()` does not work as expected - it results in Object dtype instead.
Part of PrimeIntellect/Terminal-Lego-15k.