the dataframe of "sql(query).fetch_df()" lost index
- Lingua principale
- Python
- Stelle
- 187
- Fork
- 112
- Merge medio
- 13h 29m
- PR unite (30g)
- 17
Descrizione
### What happens?
I load one dateframe (parquet file) with multi-index from s3 by the code:
```
sql = "SELECT * FROM read_parquet('s3://the-path-of-parquet');"
df = con.sql(sql).fetchdf() # <- the dataframe lost the index
```
### To Reproduce
```
sql = "SELECT * FROM read_parquet('s3://the-path-of-parquet');"
df = con.sql(sql).fetchdf() # <- the dataframe lost the index
```
### OS:
OSX
### DuckDB Package Version:
1.3.2
### Python Version:
3.11.0
### Full Name:
Jack Tang
### Affiliation:
Acme
### What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have not tested with any build
### Did you include all relevant data sets for reproducing the issue?
No - Other reason (please specify in the issue body)
### Did you include all code required to reproduce the issue?
- [x] Yes, I have
### Did you include all relevant configuration to reproduce the issue?
- [x] Yes, I have
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia eseguendo la riproduzione SQL e fetchdf() dell’issue con un file parquet rappresentativo contenente un multi-indice, quindi esamina il dataframe restituito e confrontalo con i dati di origine. Controlla la build corrente prima di determinare se la perdita si verifica nella conversione del dataframe Python; il lavoro è completato quando il comportamento è stato riprodotto e il risultato della conservazione dell’indice è coperto da un test di regressione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- database
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100