My input csv file is already 1-hot encoded (its exported from another system):
id | vehicle_1(car) | vehicle_1(truck) | vehicle_1(other) |
---|---|---|---|
1 | 0 | 1 | 0 |
2 | 1 | 0 | 0 |
Is there a way to tell pandas to treat the 'vehicle_' columns a 1-hot encoded? Perhaps during the construction of the dataframe? I'm assuming libraries like seaborn, which can plot data based on categories would need to know to treat the set of columns as 1-hot encoded values.