I have a simple code for getting a stock price data that looks like this.
import yfinance as yf
import datetime
import pandas as pd
#To get BNI price data
getBNI = yf.Ticker("BBNI.JK")
priceBNI = getBNI.history(period="1mo")
I would like to extract the dates within the 'priceBNI' variable but I am unable to. Any idea how to extract the dates? Thank you in advance.