2

I have 6 columns dataframe, index is part numbers and all columns have numeric and NaN values.

I tried below code which I found in here as well;

jan_p2 = jan_p[(np.abs(stats.zscore(jan_p))<3).all(axis=1)]

link is; Detect and exclude outliers in Pandas data frame

But it doesn't work with missing values. While creating the dataframe with pd.pivot I used fill_method=0 but it creates a bias in data.

I may try to handle data column by column with dropna() method but I guess there would be a much elegant way to do that.

Thanks in advance.

Tyr
  • 580
  • 4
  • 26

0 Answers0