Created
November 19, 2020 14:44
-
-
Save uomodellamansarda/1fe0db85c36ec16a9aa98d95abf8bedb 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
#Carichiamo e leggiamo il csv | |
csvname="reading_pomodoro_records.csv" | |
#definiamo le colonne | |
columns_name=['Index','Year', 'Month', 'Day', 'Time', 'Length', 'Start', 'End', 'Activity', 'Date','main_activity','sub_activity'] | |
#Saltiamo la prima riga contentente i titoli delle colonne del dataframe | |
#Attraverso l'argomento skiprows | |
df=pd.read_csv(csvname,names=columns_name,sep=',',skiprows=1, index_col=False) | |
#visualizziamo l'inizio del csv | |
#per capire come è definito | |
print('Numero di registrazioni:',len(df)) | |
print() | |
print(df.head()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment