解决Streamlight python中的“NoneExistentTimeError:20150322 00:00:00”错误

2024-04-25 07:37:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我几乎是python新手,当我从yahoo finance获取数据并在streamlit中运行时,遇到了“不存在的时间错误:2015-03-22 00:00:00”错误。这是我的密码:

import pandas as pd
import yfinance as yf
import streamlit as st
data = yf.Ticker(BTC-USD)
df= data.history(period='1d' , start='2015-04-22' , end='2017-03-20')
df

我怎样才能解决我的问题。 非常感谢