from sklearn.datasets import load_boston import pandas as pd def boston_data(): data = load_boston() df = pd.DataFrame(data.data, columns=data.feature_names) df['PRICE'] = data.target return df