Skip to content

DOC" update the Pandas core window rolling count docstring" #20264

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
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
Prev Previous commit
Next Next commit
Received comments on updating description to use count, return type a…
…nd examples. Updated information
  • Loading branch information
tommy-stone committed Mar 17, 2018
commit a59c9cba9c30af762eb917b3e76acb456773046f
12 changes: 6 additions & 6 deletions pandas/core/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,21 +781,21 @@ def calc(x):
class _Rolling_and_Expanding(_Rolling):

_shared_docs['count'] = dedent(r"""
The %(name)s sum if it is a non-Nan value inside the window.
The %(name)'s count of any non-Nan values inside the window.

Returns
-------
Returns the object type with the sum of the window values
in the current row.
Series or Dataframe
Returned object type is determined by the caller of %(name)

See Also
--------
Series.%(name)s : Calling object with Series data
DataFrame.%(name)s : Calling object with DataFrames
pandas.Series.%(name)s
pandas.DataFrame.%(name)s

Examples
--------
>>> s = pd.Series([2, 3, np.nan, 'values'])
>>> s = pd.Series([2, 3, np.nan, 10])
>>> s.rolling(2).count()
0 1.0
1 2.0
Expand Down