-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: deprecate range-generating keywords in DatetimeIndex #20535
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
+1. I'd be great to extend this to |
yep should do this |
We still need to do the same for PeriodIndex. |
I'm working on this now. What's the plan for |
Hmm, slight API change (I think it counts as a bug) when In [2]: start = pd.Period("2000", freq="B")
In [3]: pd.period_range(start, periods=4).freq
Out[3]: <Day>
In [4]: pd.PeriodIndex(start=start, periods=4).freq
Out[4]: <BusinessDay> I think we want |
On fields, I think that we should continue to accept them in the PeriodIndex constructor (at least, we shouldn't add them to |
I was reviewing the PR on the DatetimeIndex docstring, and the list of parameters is horribly complex because you can both use it by passing
data
(with accompanying keywords likecopy
,dtype
, ..) and by generating a range with optionalstart
,end
,periods
.Since for generating ranges, we have the special purpose
pandas.date_range
, do we need to keep this functionality in theDatetimeIndex
constructor as well?Of course deprecating it will annoy people who use it (although I think the majority of usage of DatetimeIndex passed
data
), so the question is whether it is worth it.The text was updated successfully, but these errors were encountered: