Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#Qui lavoro di har code per semplicita dei tre file
#Nel futuro riutilizzerò del codice per la lettura automatica dei tre file
file_1='datatraining.txt'
file_2='datatest.txt'
file_3='datatest2.txt'
df_train=pd.read_csv(file_1)
df_train.name="Training DataSet"
df_test=pd.read_csv(file_2)
df_test.name="Test DataSet"
df_ratio=len(df_train)/(len(df_train)+len(df_test))
print("ratio between train and test is",df_ratio)
#Questa funzione è necessaria per leggere metriche chiave del dataset
def exploration(dataframe):
print(dataframe.name)
print(dataframe.info())
print(dataframe.describe())
print(dataframe.head(5))
print(dataframe.tail(5))
exploration(df_train)
exploration(df_test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment