Created
March 15, 2019 20:54
-
-
Save uomodellamansarda/d880ab547a0a369eef8ed088c1106693 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
#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