Skip to content

Conversation

@mjhajharia
Copy link
Member

@mjhajharia mjhajharia commented May 24, 2022

addresses #5791

  • Inferring dims from named pandas indexes
  • Inferring dims from DataArrays
  • Inferring coords from DataArrays
  • A unit test
  • Possibly a (backwards compatible with deprecation warning) rename of the export_index_as_coords to infer_dims_and_coords.

cc: @michaelosthege (I might have made errors, also I just emulated the pandas code for xarray, not sure if it makes sense)

Copy link
Member

@michaelosthege michaelosthege left a comment

Choose a reason for hiding this comment

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

sorry @mjhajharia, I forgot to submit the review commend I made a few days ago 🙈

It looks like there's a block of code that got duplicated?

if dim_name is not None:
coords[dim_name] = value.index
if dims is None:
dims = dims_name
Copy link
Member

Choose a reason for hiding this comment

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

dims should be a list

In addition, it might be a good idea to account for the case of Multi-Indexed DataFrames. (raise?)

@ricardoV94
Copy link
Member

Is this PR salvageable or should we close it?

@michaelosthege
Copy link
Member

michaelosthege commented Mar 16, 2023

Actually this was continued & completed in #6514, so we can close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants