ium_478815/IUM2.ipynb
2022-03-27 20:55:06 +02:00

3.4 KiB

!pip install kaggle
!pip install pandas
!pip install seaborn
!pip install opendatasets --upgrade
import opendatasets as od
import pandas as pd
cd ~/.kaggle
!kaggle datasets download -d shree1992/housedata
!unzip -o housedata.zip
!wc -l data.csv
data = pd.read_csv('data.csv')
data
!head -n -1 data.csv | shuf > data.csv.shuf
!head -n 460 data.csv.shuf > data.csv.test
!head -n 920 data.csv.shuf | tail -n 460 > data.csv.dev
!tail -n +920 data.csv.shuf > data.csv.train
!rm data.csv.shuf
!wc -l data.csv*
data_test = pd.read_csv('data.csv.test')
data_dev = pd.read_csv('data.csv.dev')
data_train = pd.read_csv('data.csv.train')
data.describe(include='all')
data_train.describe(include='all')
data_dev.describe(include='all')
data_test.describe(include='all')
grep -P "^$" -n data.csv