Skip to content

DOC: Update pandas.Series.between_time docstring params #32014

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 2 commits into from
Feb 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7538,16 +7538,21 @@ def between_time(
Parameters
----------
start_time : datetime.time or str
The first time value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much indentation, should be four spaces.

Can you be more specific of what start_time should be? This description doesn't clarify much to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, let me try to add more detail.

end_time : datetime.time or str
The second time value.
include_start : bool, default True
Adding start_time value in the result.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I would rephrase to something like "whether the start time needs to be included in the result".

I find a bit confusing when you say "Adding", since you're telling users here what they should provide in this parameter.

include_end : bool, default True
Adding end_time value in the result.
axis : {0 or 'index', 1 or 'columns'}, default 0

Determine range time on index or columns value.
.. versionadded:: 0.24.0

Returns
-------
Series or DataFrame
If axis set on columns, it will return DataFrame format, vice versa.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say something like "data from the original object filtered to the specified dates"


Raises
------
Expand Down