I have a dataframe I'm working with.
df=
Rating | Director
7.1 A
6.5 A
5.9 A
7.9 B
9.4 B
6.7 B
I am wanting to find the average rating of the total movies per director. The goal is to see which director has higher rated films.
I know this shows me the number of times each director occurs
df['Director'].value_counts()
I know the code above will list out the number of times each Director appears but I'm not sure how to condition the statement so that it get's divided by each unique director.
[in] condition = df[df['Director'] == 'A']
condition
[out] Rating | Director
7.1 A
6.5 A
5.9 A