-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Add a new DataFrame.dti accessor #27581
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
Not sure about the idea of a data frame accessor. In the Series world when thinking about an accessor it operates on the values; this would essentially operate on the index of the object so I think not super clean from an API perspective. Agreed though the naming of |
That's a good point. I was thinking of accessors as a way to offer methods conditionally, which fits here.
it would slice the DataFrame object based on the index, yes. But does that count or not?
For one method, doing this wouldn't make sense. I'll see if there are others, and if not perhaps a name change really is the simplest solution. Thanks. |
Yea my wording was slightly off but I think we are on the same page. If you find others lmk otherwise maybe we just repurpose this issue to focus solely on the |
ok, sounds good. |
all the above are DataFrame methods which are candidates for moving beneath a dti accessor. We might want to rename |
Thanks for the suggestion, but sounds like the community and other core devs have not expressed further interest in a dti accessor. Closing but happy to reopen if theres further interest |
There's the
dt
accessor on Series which operates on the Series values:There's a top-level method
df.first
:which looks like it should live behind
dti
accessor on DataFrame.There's currently no datetime accessor on dataframe. Would it make sense to move it below a
dti
accessor on DataFrame?There's also an unfortunate unfortunate name collision between
Groupby().first
and
DataFrame.first
:Adding a
dti
accessor to DataFrame would clean that up as well.The text was updated successfully, but these errors were encountered: