pydata / pydata/xarray

Consider renaming the "data_vars" and "coords" argument to concat()

Open
#10,584 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What is your issue?

These arguments appear very prominently in the signature for xarray.concat(), but are only relevant for a small subset of users: those who are stacking datasets along a new dimension, and who aren't happy with the default behavior.

It would make sense to give them more descriptive (and obscure) names, perhaps data_vars_policy and coords_policy? And maybe the documentation could be updated to clarify the case in which users need to think about them?

CC @dcherian @jsignell

xref https://github.com/pydata/xarray/pull/10062 (which changes the default values for these arguments)

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

Start by inspecting the xarray.concat() signature and its documentation, then review the linked pull request 10062 for the related default-value changes. The work is done when the proposed argument names and the guidance about when to use them are consistently reflected in the relevant API documentation and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, data
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.