Open vuquangnguyen2016 opened 6 years ago
import numpy as np import pandas as pd import matplotlib.pyplot as plt
dataset=pd.read_csv('Dataset_Update_NguyenAnhBang.csv')
dataset=pd.drop('Column 1', axis=1, inplace=True)
df = df.reset_index(drop=True)
dataset.groupby('Catoglory').set_group('C1','C2') or dataset.groupby('Column 1').Column2
Link bai giang
dataset['Column1'].unique() Loc data = dataset[ dataset.Column1.isin(['Row 1', 'Row 2']) ]
import statsmodels.api as sms model = sms.OLS.from_formula('GRADE ~ GPA + TUCE', data=dataset).fit().summary()
Import Data
import numpy as np import pandas as pd import matplotlib.pyplot as plt
dataset=pd.read_csv('Dataset_Update_NguyenAnhBang.csv')
Drop = Delete Column
dataset=pd.drop('Column 1', axis=1, inplace=True)
Reset_index
df = df.reset_index(drop=True)
Group
dataset.groupby('Catoglory').set_group('C1','C2') or dataset.groupby('Column 1').Column2
Link bai giang
Filter data
dataset['Column1'].unique() Loc data = dataset[ dataset.Column1.isin(['Row 1', 'Row 2']) ]
Regression
import statsmodels.api as sms model = sms.OLS.from_formula('GRADE ~ GPA + TUCE', data=dataset).fit().summary()