Created
March 15, 2021 19:46
-
-
Save saksters/39ff4b4e698e550b0aef7198c22914af to your computer and use it in GitHub Desktop.
Groups GSC daily clicks together into weekly intervals from Sunday to Saturday
This file contains hidden or 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
import pandas as pd | |
df = pd.read_csv('Dates.csv') | |
df['Date'] = pd.to_datetime(df.Date) | |
df_week = df.resample('W-SAT', on='Date').Clicks.sum() | |
df_week.to_csv('export.csv') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment