Last active
January 21, 2019 01:55
-
-
Save bgweber/b15408108af0ee27a7a0293fc2b42a81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
# load the boston data set | |
from sklearn.datasets import load_boston | |
boston = load_boston() | |
# convert to a Pandas Data Frame | |
boston_pd = pd.DataFrame(data= np.c_[boston['data'],boston['target']], | |
columns= np.append(boston['feature_names'], 'target')).sample(frac=1) | |
print(boston_pd.shape) | |
boston_pd.head(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment