diff --git a/lectures/_static/lecture_specific/pandas/pandas_share_prices.png b/lectures/_static/lecture_specific/pandas/pandas_share_prices.png index 41872514..b3190d63 100644 Binary files a/lectures/_static/lecture_specific/pandas/pandas_share_prices.png and b/lectures/_static/lecture_specific/pandas/pandas_share_prices.png differ diff --git a/lectures/pandas.md b/lectures/pandas.md index 1f5e2812..7a25bf6b 100644 --- a/lectures/pandas.md +++ b/lectures/pandas.md @@ -673,11 +673,10 @@ ticker_list = {'INTC': 'Intel', 'TM': 'Toyota', 'AAPL': 'Apple', 'AMZN': 'Amazon', - 'BA': 'Boeing', + 'C': 'Citigroup', 'QCOM': 'Qualcomm', 'KO': 'Coca-Cola', - 'GOOG': 'Google', - 'PTR': 'PetroChina'} + 'GOOG': 'Google'} ``` Here's the first part of the program @@ -695,6 +694,9 @@ def read_data(ticker_list, for tick in ticker_list: stock = yf.Ticker(tick) prices = stock.history(start=start, end=end) + + # Change the index to date-only + prices.index = pd.to_datetime(prices.index.date) closing_prices = prices['Close'] ticker[tick] = closing_prices