0
from sklearn.datasets import load_boston 
import pandas as pd 
boston = load_boston() 
boston_df = pd.DataFrame(boston.data) 

columns = boston.feature_names 
boston_df.columns = columns 

boston_df.head()

this is the code to import my database. how can I substitute all the outliers of the columns "DIS" with the mean/median of the column??

Anmol Gautam
  • 949
  • 1
  • 12
  • 27
  • this is my code. my question is:how can I substitute all the outliers of the columns "DIS" with the mean/median of the column?? – Andrea Tonelli Nov 05 '18 at 23:39
  • from sklearn.datasets import load_boston import pandas as pd boston = load_boston() boston_df = pd.DataFrame(boston.data) columns = boston.feature_names boston_df.columns = columns boston_df.head() – Andrea Tonelli Nov 05 '18 at 23:39
  • Possible duplicate of [Detect and exclude outliers in Pandas dataframe](https://stackoverflow.com/questions/23199796/detect-and-exclude-outliers-in-pandas-dataframe) – H. Boe Nov 06 '18 at 08:29
  • https://stackoverflow.com/q/23199796/5728060 – H. Boe Nov 06 '18 at 08:29

0 Answers0