Hey,
While following the ‘Handling Imbalanced Classes’ notebooks for Week 2 of Starting with Data Science Bootcamp, I executed the code for scaling the data using StandardScaler.
But I am getting the following error -
ValueError: Expected 2D array, got 1D array instead:
array=[96.60480238 3.39519762].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
Can someone help me out, I have attached the screenshot of my code for reference.