Skip to content

Rename "Coordinate", "labeled" and "indexed" #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 22, 2014
Merged

Conversation

shoyer
Copy link
Member

@shoyer shoyer commented Jun 13, 2014

Fixes #142
Fixes #148

All existing code should still work but issue a FutureWarning if any of the old names are used.

Full list of updates:

Old New
Coordinate Index
coordinates indexes
noncoordinates nonindexes
indexed isel
labeled sel
select select_vars
unselect drop_vars

Most of these are both Dataset and DataArray methods/properties.

@shoyer
Copy link
Member Author

shoyer commented Jun 18, 2014

Please speak up soon with any thoughts or I will just go ahead and merge this. I have updated the first post with a table of all name changes.

I suspect the most controversial change here is Coordinate to Index.

@akleeman suggested keeping the property coordinates instead of indexes even if we rename Coordinate to Index. I'm not so sure about this, mostly because I would prefer not to introduce another word with new meaning. "Indexes" is pretty obvious to pandas users.

Another option would be Axis/axes, patterned after datarray. I don't like this option as much because the term axis in the numpy world already means an integer, and hence invites confusion pandas.Index like objects and our notion of labeled dimensions.

shoyer added 2 commits June 21, 2014 17:37
Also renamed unselect to drop_vars.

The logic behind these changes is that it would be really nice
to have a short method for indexing by dimension name, since this
is one of the most common operations one might do. Also, prefacing
an indexing method with "i" nicely mirrors how pandas names its
indexing methods/properties -- now it's clear that "sel" and "isel"
are variants of each other.

Fixes pydata#148.
@shoyer shoyer added this to the 0.2 milestone Jun 22, 2014
@shoyer shoyer added the API label Jun 22, 2014
shoyer added a commit that referenced this pull request Jun 22, 2014
Rename "Coordinate", "labeled" and "indexed"
@shoyer shoyer merged commit 75f5f93 into pydata:master Jun 22, 2014
@shoyer shoyer deleted the renamings branch June 22, 2014 00:44
shoyer added a commit to shoyer/xarray that referenced this pull request Jul 10, 2014
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.

API: rename "labeled" and "indexed" Rename "coordinates" to "indices"?
1 participant