If you are using the yfinance package, then you can get the last day’s open this way.
import yfinance as yf
data = yf.download(tickers = "dji", interval = "1d", period = "1d")
print(data["Open"][0])
If you are using the yfinance package, then you can get the last day’s open this way.
import yfinance as yf
data = yf.download(tickers = "dji", interval = "1d", period = "1d")
print(data["Open"][0])