Skip to content

DOC: improve cross-links in docs between .expanding and .cum* #12651

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

Closed
jreback opened this issue Mar 17, 2016 · 2 comments
Closed

DOC: improve cross-links in docs between .expanding and .cum* #12651

jreback opened this issue Mar 17, 2016 · 2 comments
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Docs Numeric Operations Arithmetic, Comparison, and Logical operations
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Mar 17, 2016

xref #12648

  • cross-link doc-strings for .cum* to the .expanding().* (for sum,prod,max,min, which are only supported).
  • show an example (in computation.rst wher eexpanding is shown? or basics.rst (where cum* are shown)) how these are related (w.r.t. NaN filling).
In [7]: s = Series([1,2,np.nan,3,np.nan,4])

In [8]: s.cumsum()
Out[8]: 
0     1.0
1     3.0
2     NaN
3     6.0
4     NaN
5    10.0
dtype: float64

In [9]: s.expanding().sum()
Out[9]: 
0     1.0
1     3.0
2     3.0
3     6.0
4     6.0
5    10.0
dtype: float64

In [10]: s.cumsum().ffill()
Out[10]: 
0     1.0
1     3.0
2     3.0
3     6.0
4     6.0
5    10.0
dtype: float64
@jreback jreback added Docs Numeric Operations Arithmetic, Comparison, and Logical operations Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Difficulty Novice labels Mar 17, 2016
@jreback jreback added this to the 0.18.1 milestone Mar 17, 2016
prabhjotsumman added a commit to prabhjotsumman/pandas that referenced this issue Mar 20, 2016
@jreback jreback modified the milestones: 0.18.1, 0.18.2 Apr 26, 2016
@shawnheide
Copy link
Contributor

@jreback I looked into this but am confused as to how to implement the cross-linking in the docstrings. The expanding function for dataframes and series don't have a doc page for .sum, .product, etc. As I understand it this is just chaining the .expanding method with the .sum method, so there shouldn't be a separate doc page right?

As an alternative we could just cross-link .expanding to all of the .cum* and vice-versa. But I'm not sure if that's what you were going for.

@jreback
Copy link
Contributor Author

jreback commented Jul 17, 2016

just show an example as indicated above

@jorisvandenbossche jorisvandenbossche modified the milestones: 0.20.0, 0.19.0 Aug 19, 2016
ischurov pushed a commit to ischurov/pandas that referenced this issue Dec 19, 2016
- [x] closes pandas-dev#12651  - [x] passes `git diff upstream/master | flake8
--diff`

Author: adrian-stepien <[email protected]>

Closes pandas-dev#14098 from adrian-stepien/doc/12651 and squashes the following commits:

4427e28 [adrian-stepien] DOC: Improved links between expanding and cum* (pandas-dev#12651)
8466669 [adrian-stepien] DOC: Improved links between expanding and cum* (pandas-dev#12651)
30164f3 [adrian-stepien] DOC: Correct link from b/ffill to fillna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Docs Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
3 participants