Skip to content
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

DOC: Updating Series.agg docstring #22474

Merged
merged 2 commits into from
Aug 24, 2018
Merged

DOC: Updating Series.agg docstring #22474

merged 2 commits into from
Aug 24, 2018

Conversation

alimcmaster1
Copy link
Member

With reference to: #22459. I have fixed up the agg/map doc strings for pandas/core/series.py so they now pass our doc tests. CC @jorisvandenbossche

Thanks,

@jorisvandenbossche jorisvandenbossche changed the title Fix up a few doc strings DOC (doctests): Fix up a few doc strings Aug 23, 2018
@jorisvandenbossche
Copy link
Member

Thanks for the PR!
Just a question, how does this fix the map docstring? (I only see changes to the agg docstring? Or that one was already passing?)

@jorisvandenbossche jorisvandenbossche added this to the 0.24.0 milestone Aug 23, 2018
@codecov
Copy link

codecov bot commented Aug 23, 2018

Codecov Report

Merging #22474 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #22474   +/-   ##
=======================================
  Coverage   92.04%   92.04%           
=======================================
  Files         169      169           
  Lines       50740    50740           
=======================================
  Hits        46705    46705           
  Misses       4035     4035
Flag Coverage Δ
#multiple 90.45% <ø> (ø) ⬆️
#single 42.24% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/series.py 93.73% <ø> (ø) ⬆️
pandas/core/generic.py 96.44% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2be2ba5...fd81518. Read the comment docs.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, just couple of styling things.

@@ -3046,21 +3046,21 @@ def _gotitem(self, key, ndim, subset=None):
Examples
--------

>>> s = pd.Series(np.random.randn(10))
>>> s = pd.Series(range(1,10,1))
Copy link
Member

Choose a reason for hiding this comment

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

As it doesn't make a difference for the example, I'd use [1, 2, 3, 4] instead of range (it makes the example easier to understand). In any case, please check pep8 in the examples, there are missing spaces after the commas.

Copy link
Member

Choose a reason for hiding this comment

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

Can you also show >>> s after creating it, and remove the blank line between the examples title and the code.


pandas.Series.apply : Invoke function on a Series.
pandas.Series.transform : Transform function producing
a Series with like indexes.
Copy link
Member

Choose a reason for hiding this comment

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

I think this should have the standard 4 spaces indentation.

@datapythonista datapythonista changed the title DOC (doctests): Fix up a few doc strings DOC: Updating Series.agg docstring Aug 23, 2018
@alimcmaster1
Copy link
Member Author

Thanks both for the comments. Yes @jorisvandenbossche map doc string was already passing. @datapythonista update as per your comments, let me know if there is anything else, thanks

@jorisvandenbossche
Copy link
Member

The failure on travis is an unrelated build issue (and already happening on master as well), so merging

Thanks a lot @alimcmaster1 !

@jorisvandenbossche jorisvandenbossche merged commit 447580e into pandas-dev:master Aug 24, 2018
@alimcmaster1
Copy link
Member Author

Thanks both!!

@alimcmaster1 alimcmaster1 deleted the docstr-fixes branch August 26, 2018 18:33
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants