Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.2.42 still issue with timezone-aware with multiply tickers #2035

Open
githubbla opened this issue Aug 22, 2024 · 0 comments
Open

0.2.42 still issue with timezone-aware with multiply tickers #2035

githubbla opened this issue Aug 22, 2024 · 0 comments

Comments

@githubbla
Copy link

`!pip install yfinance==0.2.42 --upgrade --no-cache-dir
import yfinance as yf

df2 = yf.download(["SPY","QQQ"], "2023-01-01", "2023-12-31", auto_adjust=True,ignore_tz = True)
df = yf.download("QQQ", "2023-01-01", "2023-12-31", auto_adjust=True,ignore_tz = True)

def check_datetime_tz(dt):
if dt.tzinfo is None:
return "Naive"
elif dt.tzinfo.utcoffset(dt) is None:
return "Naive"
else:
return "Timezone-aware"

print("\ndf2=",check_datetime_tz(df2.index[0]))

print("df=",check_datetime_tz(df.index[0]))
`
Screenshot 2024-08-22 at 19 59 49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants