Skip to content

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

Open

Description

@shoyer

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 #10062 (which changes the default values for these arguments)

Activity

  1. added
    needs triage
    on Jul 30, 2025
  2. jsignell commented on Aug 1, 2025

    @jsignell
    Member

    Hmm. Both of these can also be set to a list of strings to indicate the specific data_vars or coords that you want to concatenate in addition to "minimal" so that doesn't really fit with the name: data_vars_policy or coords_policy.

  3. added and removed
    needs triage
    on Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions