How to convert datatype of column names in the pipeline having OneHotEncoder #5144
Unanswered
VyomkeshVyas
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hm, this sounds like sklearn's input checks for My guess is that something in the pipeline creates columns with inhomogenous types, and Let's move this to a bug report. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all. I am trying to build a pipeline with linear regressor, lag features (as WindowSummarizer within make_reduction) and date time features (as one hot encoded) and I am getting following error while calling fit() :
TypeError: Feature names are only supported if all input features have string names, but your input has ['int', 'str'] as feature name / column name types. If you want feature names to be stored and validated, you must convert them all to strings, by using X.columns = X.columns.astype(str) for example. Otherwise you can remove feature / column names from your input data, or convert them all to a non-string data type.
Reproducible Example
Can someone help me in fixing this error?
Beta Was this translation helpful? Give feedback.
All reactions