Careful use csv offline

Hello,

i downloaded the adult_census.csv file directly from openml website.

Just be careful of the features labels.
I don’t know why but some of them end with ‘:’ character.
So if you directly use the notebook example, it fails at classifying features.

To avoid this i wrote:

adult_census = pd.read_csv("./adult-census.csv")
adult_census.columns = adult_census.columns.str.replace(':', ''))

So i didn’t need to directly update the csv file.

Regards

1 Like

Yes there are several versions of this dataset online and some have this weird problem with the trailing “:” character.