In [3]:
import yfinance as yf
import pandas as pd

goog = yf.Ticker('GOOG')
analyst_calls = goog.recommendations
analyst_calls


Out[3]:
Firm To Grade From Grade Action
Date
2012-03-14 Oxen Group Hold init
2012-03-28 Citigroup Buy main
2012-04-03 Global Equities Research Overweight main
2012-04-05 Deutsche Bank Buy main
2012-04-09 Pivotal Research Buy main
... ... ... ... ...
2020-03-30 UBS Buy main
2020-03-30 Morgan Stanley Overweight main
2020-03-30 BMO Capital Outperform Market Perform up
2020-04-17 Mizuho Buy main
2020-04-17 Oppenheimer Outperform main

391 rows × 4 columns


In [9]:
# get a count of analyst gradings for the last month
analyst_calls.last('3M').groupby(['To Grade']).count()


Out[9]:
Firm From Grade Action
To Grade
Buy 10 10 10
Outperform 3 3 3
Overweight 4 4 4
Strong Buy 1 1 1

In [ ]: