We changed our privacy policy. Read more.
1

Try this, col_names = list(tranformer.named_transformers_['one_hot'].get_feature_names())+numerical_features df1 = pd.DataFrame.sparse.from_spmatrix(transformed_X) df1.columns = col_names df1.head()


Only top voted, non community-wiki answers of a minimum length are eligible