0

enter image description here I have the following data table and would like to look at each ticker value (there are 8032 unique types) and add the b_mkt (with the same TICKER) for each year and take the avg. I was wondering if there is a pandas method that would allow me to do that? Any help is much appreciated :)

Greasy Chicken
  • 107
  • 1
  • 9

1 Answers1

0

That sounds like a groupby:

your_dataframe.groupby(['TICKER','DATE']).mean()

Edit: forgot brackets

E. Bassett
  • 166
  • 7