'MinMaxScaler Is deleting data from Dataset
So i have a dataset that I need to scale so I can preform KNN and logistic regression. The data contains a feature called country(for the question lets say its seperated 0,1,2,3,4) now when I scale my data
from sklearn.preprocessing import MinMaxScaler
scaler = MinMaxScaler()
scaled_clean_df = pd.DataFrame(scaler.fit_transform(clean_df), columns=clean_df.columns)
It is deleting data
scaled_clean_df[scaled_clean_df["Country"]==3].shape
(0, 32)
But for others it is not deleting data
scaled_clean_df[scaled_clean_df["Country"]==1].shape
(13728, 32)
The missing data for all the countries are from the same columns but obviously the amount of nulls are different in each one.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
