Both OneHotEncoder and pd.get_dummies are used to convert categorical data into numerical data. But what
![python - OneHotEncoder : ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all() - Stack Overflow python - OneHotEncoder : ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all() - Stack Overflow](https://i.stack.imgur.com/ev2Ow.png)
python - OneHotEncoder : ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all() - Stack Overflow
![python - One hot encoding "got an unexpected keyword argument 'categorical_features'" - Stack Overflow python - One hot encoding "got an unexpected keyword argument 'categorical_features'" - Stack Overflow](https://i.stack.imgur.com/R5CDP.jpg)
python - One hot encoding "got an unexpected keyword argument 'categorical_features'" - Stack Overflow
![Encoding Categorical Variables: One-hot vs Dummy Encoding | by Rukshan Pramoditha | Towards Data Science Encoding Categorical Variables: One-hot vs Dummy Encoding | by Rukshan Pramoditha | Towards Data Science](https://miro.medium.com/v2/resize:fit:837/1*d5-PQyRRjvzBZjI5f7X3hA.png)
Encoding Categorical Variables: One-hot vs Dummy Encoding | by Rukshan Pramoditha | Towards Data Science
![python - Getting Error of using OneHotEncoder and SimpleImputer in a Single Pipeline - Stack Overflow python - Getting Error of using OneHotEncoder and SimpleImputer in a Single Pipeline - Stack Overflow](https://i.stack.imgur.com/Wt6F6.png)
python - Getting Error of using OneHotEncoder and SimpleImputer in a Single Pipeline - Stack Overflow
![Categorical Data Encoding with Sklearn LabelEncoder and OneHotEncoder - MLK - Machine Learning Knowledge Categorical Data Encoding with Sklearn LabelEncoder and OneHotEncoder - MLK - Machine Learning Knowledge](https://machinelearningknowledge.ai/wp-content/uploads/2021/09/Categorical-Data-Encoding-with-Sklearn-OneHotEncoder-and-LabelEncoderr.jpg)
Categorical Data Encoding with Sklearn LabelEncoder and OneHotEncoder - MLK - Machine Learning Knowledge
![Data Science Tip #005: Two Correct Ways to Perform One-Hot Encoding! | by David Hundley | Towards Data Science Data Science Tip #005: Two Correct Ways to Perform One-Hot Encoding! | by David Hundley | Towards Data Science](https://miro.medium.com/v2/resize:fit:1400/1*3L-Vg_S4fS7URwJpYyLX8g.png)