Commit a18259a
apacheGH-37050: [Python][Interchange protocol] Add a workaround for empty dataframes (apache#38037)
### Rationale for this change
The implementation of the DataFrame Interchange Protocol does not currently support consumption of dataframes with 0 number of chunks (empty dataframes).
### What changes are included in this PR?
Add a workaround to not error in this case.
### Are these changes tested?
Yes, added `test_empty_dataframe` in `python/pyarrow/tests/interchange/test_conversion.py`.
### Are there any user-facing changes?
No.
* Closes: apache#37050
Authored-by: AlenkaF <frim.alenka@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>1 parent 75510a2 commit a18259a
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
0 commit comments