0
I started to study python a short time ago and a problem has arisen that I am not able to solve. I have a csv file containing two columns('ds' = dates and 'y'= data of any result of the respective date), in this file I need to group all dates by days of the week to be able to do my analysis in the future. But I can’t figure out a way to manipulate the data frame in a way that can accomplish this. Here’s the test code I tried to do.
The csv file I’m trying to manipulate: https://github.com/facebook/prophet/blob/master/examples/example_wp_log_peyton_manning.csv
If anyone can help me I really appreciate.
from datetime import date
import pandas as pd
df = pd.read_csv('/content/drive/My Drive/example.csv',delimiter=',') #Lê o arquivo
df[pd.Timestamp(df['ds']).dayofweek]