the dataframe of "sql(query).fetch_df()" lost index
- Vorherrschende Sprache
- Python
- Sterne
- 187
- Forks
- 112
- Ø Merge
- 13 Std. 29 Min.
- Gemergte PRs (30 T.)
- 17
Beschreibung
### 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
Beitragsleitfaden
Rechercherichtung
Führe zunächst die SQL- und fetchdf()-Reproduktion aus dem Issue mit einer repräsentativen parquet-Datei durch, die einen Multi-Index enthält, inspiziere dann den zurückgegebenen DataFrame und vergleiche ihn mit den Quelldaten. Überprüfe den aktuellen Build, bevor du eingrenzt, ob der Verlust bei der Konvertierung des Python-DataFrames auftritt; abgeschlossen ist die Aufgabe, wenn das Verhalten reproduziert und das Ergebnis der Index-Erhaltung durch einen Regressionstest abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- database
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100