ranaroussi/yfinance

Dataframe with incorrect index type returned when combining two tickers (one without data)

Geschlossen

#1.382 geöffnet am 30.01.2023

 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (3.403 Forks)batch import
Help wanted

Repository-Metriken

Stars
 (25.052 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (16 gemergte PRs in 30 T)

Beschreibung

import yfinance as yf
df = yf.download( tickers = ["^NDX", "^TWII"],       
                  start="2023-01-22", end="2023-01-29",
                  interval = "1m",
                  group_by = 'column',
                  auto_adjust = False,
                  prepost = True,
                  threads = True,
                  proxy = None
                  )
[*********************100%***********************]  2 of 2 completed

1 Failed download:
- ^TWII: No data found for this date range, symbol may be delisted

It's not delisted, it's just there as there is no data due to the lunar new year. The problem is the returned dataframe index is not a datetime index, but has type object)

yfinace version 0.2.9, python 3.10.8 on Linux ubuntu

Contributor Guide