Skip to content

Switch the name of datetime components from 'time.month' to 'month' #351

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 1 commit into from
Mar 2, 2015

Conversation

shoyer
Copy link
Member

@shoyer shoyer commented Mar 2, 2015

Fixes #345

This lets you write things like:

counts = time.groupby('time.month').count()
counts.sel(month=2)

instead of the previously valid

counts.sel(**{'time.month': 2})

which is much more awkward. Note that this breaks existing code which relied on the old usage.

CC @jhamman

@shoyer shoyer added this to the 0.4 milestone Mar 2, 2015
Fixes GH345

This lets you write things like:

    counts = time.groupby('time.month').count()
    counts.sel(month=2)

instead of the previously valid

    counts.sel(**{'time.month': 2})

which is much more awkward

CC jhamman
@shoyer shoyer force-pushed the datetime-shortcut branch from a480df9 to 918016b Compare March 2, 2015 20:56
shoyer added a commit that referenced this pull request Mar 2, 2015
Switch the name of datetime components from 'time.month' to 'month'
@shoyer shoyer merged commit 31b6365 into pydata:master Mar 2, 2015
@shoyer shoyer deleted the datetime-shortcut branch March 2, 2015 23:20
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.

Alternatives to virtual variables in the form "time.season"?
1 participant