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: fix mistake in Series.str.cat #21330

Merged
merged 2 commits into from
Jun 6, 2018

Conversation

h-vetinari
Copy link
Contributor

Fix error in API-docstring that was introduced at the end of #20347 due to timepressure for the v.0.23-cutoff: removed functionality that categorical callers get categorical output, but forgot to adapt doc-string.

Unfortunately, this survived both #20347 and the follow-up, but since v.0.23.1 is coming soon, I didn't wanna let this opportunity pass.

@codecov
Copy link

codecov bot commented Jun 5, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #21330   +/-   ##
=======================================
  Coverage   91.85%   91.85%           
=======================================
  Files         153      153           
  Lines       49549    49549           
=======================================
  Hits        45512    45512           
  Misses       4037     4037
Flag Coverage Δ
#multiple 90.25% <ø> (ø) ⬆️
#single 41.87% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/strings.py 98.62% <ø> (ø) ⬆️
pandas/core/series.py 94.12% <0%> (ø) ⬆️

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 7dc6f70...439021e. Read the comment docs.

@gfyoung gfyoung added the Docs label Jun 6, 2018
if the calling Series/Index is categorical.
concat :
str if `others` is None, Series/Index of objects if `others` is not
None.
Copy link
Member

@gfyoung gfyoung Jun 6, 2018

Choose a reason for hiding this comment

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

  1. I would still put all possible data-types right after the concat: part.

  2. OCD kicking in here: can we rephrase so that None isn't by itself on that last line?

Copy link
Member

Choose a reason for hiding this comment

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

@h-vetinari : Moving your reply here to the thread:

@gfyoung
It doesn't fit, unfortunately. Otherwise I would have left it there as well.

Current state:
fix_str_cat_doc_curr

Propsed:
fix_str_cat_doc_new

I'm guessing this is mainly due to the docstring parser + linelength-limit; it might work without a line break - I could do a #noqa line, I guess?

Copy link
Member

@gfyoung gfyoung Jun 6, 2018

Choose a reason for hiding this comment

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

  1. The dtype suggestion I made should be do-able on one line.

  2. For these types of issues with a single word on one line, you can try rewriting the whole description e.g.:

If `other` is None, `str` is returned, otherwise `Series / Index` of objects is returned.

We generally try avoid using noqa unless absolutely necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair enough. See new suggestion

@pandas-dev pandas-dev deleted a comment from h-vetinari Jun 6, 2018
Copy link
Member

@gfyoung gfyoung left a comment

Choose a reason for hiding this comment

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

Nice! LGTM!

@jorisvandenbossche jorisvandenbossche added this to the 0.23.1 milestone Jun 6, 2018
@jorisvandenbossche jorisvandenbossche merged commit 0c65c57 into pandas-dev:master Jun 6, 2018
@jorisvandenbossche
Copy link
Member

@h-vetinari Thanks!

@h-vetinari h-vetinari deleted the fix_str_cat_doc branch June 6, 2018 15:29
TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request Jun 12, 2018
TomAugspurger pushed a commit that referenced this pull request Jun 12, 2018
david-liu-brattle-1 pushed a commit to david-liu-brattle-1/pandas that referenced this pull request Jun 18, 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.

4 participants