Skip to content

Error in doc of DatetimeIndex.indexer_between_time #12038

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

Closed
lopezco opened this issue Jan 14, 2016 · 5 comments
Closed

Error in doc of DatetimeIndex.indexer_between_time #12038

lopezco opened this issue Jan 14, 2016 · 5 comments
Labels
Datetime Datetime data dtype Docs Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@lopezco
Copy link

lopezco commented Jan 14, 2016

Hello everyone,

This is not a major issue: I was trying to use the tz parameter as indicated on the documentation of DatetimeIndex.indexer_between_time and it turns out that tz is not implemented.

Here is an example:

import pandas as pd
pd.DatetimeIndex(['2016-01-01 00:00:00', '2016-01-01 01:00:00', '2016-01-01 02:00:00']).indexer_between_time('01:00', '02:00', tz='Europe/Paris')
Traceback (most recent call last):
  File "~/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 3066, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-98-258497b42264>", line 1, in <module>
    pd.DatetimeIndex(['2016-01-01 00:00:00', '2016-01-01 01:00:00', '2016-01-01 02:00:00']).indexer_between_time('01:00', '02:00', tz='Europe/Paris')
TypeError: indexer_between_time() got an unexpected keyword argument 'tz'
@rockg
Copy link
Contributor

rockg commented Jan 14, 2016

That doc should be fixed (and you see the signature no longer has a tz argument). Having a tz makes no sense in this context.

@jreback jreback added Docs Datetime Datetime data dtype Indexing Related to indexing on series/frames, not to indexes themselves Difficulty Novice labels Jan 14, 2016
@jreback jreback added this to the 0.18.0 milestone Jan 14, 2016
@jreback
Copy link
Contributor

jreback commented Jan 14, 2016

@JoseRLC want to do a pull-request for that?

@RahulHP
Copy link
Contributor

RahulHP commented Jan 15, 2016

Can I try this out? This seems like a good issue for a first PR.

@jorisvandenbossche
Copy link
Member

@RahulHP Certainly, go for it! If you have any questions about the workflow (see http://pandas.pydata.org/pandas-docs/stable/contributing.html), just ask (you can also use the gitter channel for that: https://gitter.im/pydata/pandas)

@jorisvandenbossche
Copy link
Member

Closed by #12043

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Docs Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

No branches or pull requests

5 participants