My goal is to create a new column that includes the total repetitions per date.
Before
date
0 6/1/18
1 6/1/18
2 6/4/18
3 6/5/18
4 6/6/18
6 6/6/18
7 6/6/18
After
date count
0 6/1/18 2
1 6/1/18 2
2 6/4/18 1
3 6/5/18 1
4 6/6/18 3
6 6/6/18 3
7 6/6/18 3
I tried using some similar solutions on this site to fit my criteria to no luck.
# Possible format I can use, but not what I am looking for.
df.loc[df['date'] == 1, 'b'].sum()
# I changed it to this to this to no solution.
df['Count'] = df.loc[df['date'] == df['date']].sum()
Perhaps I am on the wrong path, but any insight would be appreciated.