Hi. I used the predict method on a pandas dataframe with the same column names of the dataframe used in the fit method, but the columns with the predict method got renamed from 1 to attribute_1, 2 to attribute_2, etc. Is this because the column names are numeric?
You are right - this is because the column names are numeric. If you want to keep your column name, please use other column name, for example feature1 .
Hi. I used the
predict
method on a pandas dataframe with the same column names of the dataframe used in thefit
method, but the columns with thepredict
method got renamed from1
toattribute_1
,2
toattribute_2
, etc. Is this because the column names are numeric?