31 lines
718 B
Python
31 lines
718 B
Python
import wget
|
|
url = 'https://git.wmi.amu.edu.pl/s434788/ium_434788/raw/branch/master/winequality-red.csv'
|
|
wget.download(url, out='winequality-red.csv', bar=None)
|
|
|
|
import pandas as pd
|
|
wine=pd.read_csv('winequality-red.csv')
|
|
wine
|
|
|
|
from sklearn.model_selection import train_test_split
|
|
|
|
wine_train, wine_test = train_test_split(wine, test_size=360,train_size=959, random_state=1)
|
|
|
|
wine_test["quality"].value_counts()
|
|
|
|
wine_train["quality"].value_counts()
|
|
|
|
wine
|
|
|
|
wine["quality"].value_counts()
|
|
|
|
wine.describe(include='all')
|
|
|
|
wine["quality"]=((wine["quality"]-wine["quality"].min())/(wine["quality"].max()-wine["quality"].min()))*20
|
|
|
|
wine["quality"].value_counts()
|
|
|
|
wine.isnull().sum()
|
|
|
|
wine.dropna(inplace=True)
|
|
|
|
print(wine) |