![SOLVED: Texts: # Perform the label encoding and feature scaling le = LabelEncoder() df['gender'] = le.fittransform(df['gender']) NameError Traceback (most recent call last) <ipython-input-23-88747ff39738> in <cell line: 2>() 1 # Perform the label SOLVED: Texts: # Perform the label encoding and feature scaling le = LabelEncoder() df['gender'] = le.fittransform(df['gender']) NameError Traceback (most recent call last) <ipython-input-23-88747ff39738> in <cell line: 2>() 1 # Perform the label](https://cdn.numerade.com/ask_images/5eccfa554ca640ec808abaf5fca5b0fa.jpg)
SOLVED: Texts: # Perform the label encoding and feature scaling le = LabelEncoder() df['gender'] = le.fittransform(df['gender']) NameError Traceback (most recent call last) <ipython-input-23-88747ff39738> in <cell line: 2>() 1 # Perform the label
![ValueError: Shape mismatch: if categories is an array, it has to be of shape (n_features,) · Issue #1 · Krishnarohith10/OneHotEncoder · GitHub ValueError: Shape mismatch: if categories is an array, it has to be of shape (n_features,) · Issue #1 · Krishnarohith10/OneHotEncoder · GitHub](https://user-images.githubusercontent.com/44919399/71778126-a0290500-2fcf-11ea-809b-97924f73dcfd.jpg)
ValueError: Shape mismatch: if categories is an array, it has to be of shape (n_features,) · Issue #1 · Krishnarohith10/OneHotEncoder · GitHub
![Powering Up Your Pandas Part II — Label Encoding and One Hot Encoding | by Handhika Yanuar Pratama | Data Folks Indonesia | Medium Powering Up Your Pandas Part II — Label Encoding and One Hot Encoding | by Handhika Yanuar Pratama | Data Folks Indonesia | Medium](https://miro.medium.com/v2/resize:fit:1400/1*RUm2yPXB4d8y-TyCsYQbrA.png)
Powering Up Your Pandas Part II — Label Encoding and One Hot Encoding | by Handhika Yanuar Pratama | Data Folks Indonesia | Medium
![python - What's the difference between fit and fit_transform in scikit-learn models? - Data Science Stack Exchange python - What's the difference between fit and fit_transform in scikit-learn models? - Data Science Stack Exchange](https://i.stack.imgur.com/SuUoX.jpg)
python - What's the difference between fit and fit_transform in scikit-learn models? - Data Science Stack Exchange
How I Used LabelEncoder to Classify Categories | by Tracyrenee | Artificial Intelligence in Plain English
![Things I learned During My Third Sprint in my Artificial Intelligence for Business Decisions and Transformation | by Sanketpatel | Medium Things I learned During My Third Sprint in my Artificial Intelligence for Business Decisions and Transformation | by Sanketpatel | Medium](https://miro.medium.com/v2/resize:fit:2000/1*6M280_Be12f1l5uaAwXdhw.png)