1

The code master_df.drop(["Film Number"], axis=1, inplace=True) you have written is right. What is happening is like you have removed the column perfectly but while converting to csv file or excel file the index column (whatever column you have mentioned with values like 0,1,2,3) get added in the output so please replace one more argument index=...


1

why categories are converted to numeric values? Its due to the simple fact that the most machine learning models do not accept categorical values to perform prediction. For this reason its Yes, for this reason there are some techniques(like SMOTE) to ensure the data is rightly balanced. You can also opt for other metrics like F1 score which works for ...


1

It depends. If you are using this data on a linear model it is better to remove correlated features. But some non-linear complex model can use or eliminate these correlated feature automatcially.


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