pydata / pydata/xarray

What should pad do about IndexVariables?

Open
#3,868 6 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently pad adds NaNs for coordinate labels, which results in substantially reduced functionality.

We need to think about

  1. Int, Float, Datetime64, CFTime indexes: linearly extrapolate? Should we care whether the index is sorted or not? (I think not)
  2. MultiIndexes: ??
  3. CategoricalIndexes: ??
  4. Unindexed dimensions

EDIT: Added unindexed dimensions

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 tracing the pad operation's handling of coordinate labels and IndexVariables. Work through the listed cases—numeric and datetime indexes, MultiIndexes, CategoricalIndexes, and unindexed dimensions—and clarify the intended behavior for each. Done means the behavior is specified and the resulting padding no longer broadly reduces coordinate functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.