How do we standardize arrays with NaN?

by uharsha33   Last Updated April 16, 2018 12:19 PM

I used StandardScaler() to standardize data so for, but this doesn't work with NaNs. None of the other methods I know of (MinMaxScaler, RobustScaler, MaxAbsScaler) work with NaNs either. Are there other methods?

My search results came up with a solution

df['col']=(df['col']-df['col'].min())/(df['col'].max()-df['col'].min())

But this works only with panda dataframes (they have column names). Is there a way to implement column headers in the matrix?



Related Questions



Understand "standardize" for data preprocessing

Updated December 18, 2017 01:19 AM


Standardization with mean/std or median/IQR?

Updated April 05, 2016 08:08 AM