Execute the following steps to download data from Yahoo Finance.
- Import the libraries:
import pandas as pd
import yfinance as yf
- Download the data:
df_yahoo = yf.download('AAPL',
start='2000-01-01',
end='2010-12-31',
progress=False)
We can inspect the downloaded data:
The result of the request is a DataFrame (2,767 rows) containing daily Open, High, Low, and Close (OHLC) prices, as well as the adjusted close price and volume.