Skip to content

GH-37050: [Python][Interchange protocol] Add a workaround for empty dataframes#38037

Merged
jorisvandenbossche merged 1 commit intoapache:mainfrom
AlenkaF:gh-37050-empty-object-workaround
Oct 10, 2023
Merged

GH-37050: [Python][Interchange protocol] Add a workaround for empty dataframes#38037
jorisvandenbossche merged 1 commit intoapache:mainfrom
AlenkaF:gh-37050-empty-object-workaround

Conversation

@AlenkaF
Copy link
Member

@AlenkaF AlenkaF commented Oct 5, 2023

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.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jorisvandenbossche jorisvandenbossche merged commit 9afa848 into apache:main Oct 10, 2023
@jorisvandenbossche jorisvandenbossche removed the awaiting review Awaiting review label Oct 10, 2023
@github-actions github-actions bot added the awaiting merge Awaiting merge label Oct 10, 2023
@AlenkaF AlenkaF deleted the gh-37050-empty-object-workaround branch October 10, 2023 11:20
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 9afa848.

There were 21 benchmark results indicating a performance regression:

The full Conbench report has more details.

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…mpty 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>
@anjakefala anjakefala added the Critical Fix Bugfixes for security vulnerabilities, crashes, or invalid data. label Nov 14, 2023
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…mpty 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge Awaiting merge Component: Python Critical Fix Bugfixes for security vulnerabilities, crashes, or invalid data.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Python] Cannot read empty DataFrame Interchange object

3 participants