pydata / pydata/xarray

ENH: Make `_to_dataframe` faster for extension array columns after `pandas` fix

Open
#8,950 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

upstream issue
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

What is your issue?

One https://github.com/pandas-dev/pandas/issues/57676 is completed, we should be able to do the joins in the _to_dataframe method faster (we need to be able to handle the singleton case which is hte issue with pandas): https://github.com/pydata/xarray/blob/239309f881ba0d7e02280147bc443e6e286e6a63/xarray/core/dataset.py#L7170-L7177

see discussion here

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read xarray/core/dataset.py at the _to_dataframe implementation around lines 7170-7177, then review pandas issue #57676 and the discussion in xarray PR #8723. The change is complete when joins for extension array columns handle the singleton case and are faster after the pandas fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.