Search code examples
pythonpandasfinance

Python pandas Recording dividend information from yahoo finance


Other than pull OHLC, volume and adjusted close from the Datareader, Is there a way to capture the previous ex dividend dates and the dividend price using methods in pandas.io.data?

If not is the best way to pull dividend data using the request library and codes from here?


Solution

  • Pandas now supports pulling dividend information from yahoo finance.

    from pandas_datareader import data
    
    data.DataReader('PFF', 'yahoo-actions') # returns dividend history for ticker PFF