-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Add documentation for freq='infer' option of DatetimeIndex and TimedeltaIndex constructors #21128
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
Comments
Hi jschendel, I am newbie to opensource. Can I work on this.? |
@kirakrishnan : Sure, go for it! |
Thanks @jschendel. This is my understanding. Please tell me if I am wrong currently the documentation for And the documentation for And I need to update documentation this way freq: 'infer' adding this example under In [5]: pd.TimedeltaIndex(['0 days', '10 days', '20 days']) adding this example under In [3]: pd.DatetimeIndex(['2018-01-01', '2018-01-03', '2018-01-05']) |
Yes, that's more or less what to do. A few small adjustments: For the
And add an additional sentence to the description along the lines of (modify the wording as you see fit):
For the For Not entirely sure where this should go in
and first give an example of the regular ( |
Thank you so much @jschendel . I have made changes and created pull request. Please review it. |
There currently doesn't appear to be any information regarding passing
freq='infer'
to theDatetimeIndex
orTimedeltaIndex
constructors; I only became aware of this option from reading over the code. Would be nice to document this feature in the docstrings forDatetimeIndex
andTimedeltaIndex
. Possibly intimeseries.rst
andtimdeltas.rst
too.Essentially, this allows users to set the frequency of the index as the inferred frequency upon creation:
Note that the frequency is not automatically inferred if nothing is passed to the
freq
parameter:Similar example with
TimedeltaIndex
:The text was updated successfully, but these errors were encountered: