8000 DOC: add concatenation-section to text.rst by h-vetinari · Pull Request #20790 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: add concatenation-section to text.rst #20790

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 6 commits into from
Apr 24, 2018
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
Fix variable names
  • Loading branch information
axel-d-one committed Apr 23, 2018
commit 03fa01d6c6e1ea01bbf55e4c4173e79a15c6ff1c
8 changes: 4 additions & 4 deletions doc/source/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ Series are *not* aligned on their index before concatenation:
# without alignment
s.str.cat(u)
# manual alignment
Copy link
Contributor

Choose a reason for hiding this comment

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

can you say this is in a more user friendly way (don't like the word manual)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's another try. As an aside, the lack of alignment isn't user-friendly (which is exactly the point of #20347)

t, v = s.align(u)
t.str.cat(v)
v, w = s.align(u)
v.str.cat(w)

Concatenating a Series and many objects into a Series
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -266,8 +266,8 @@ All elements of the list must match in length to the calling ``Series``:

.. ipython:: python

t = pd.Series([1, 2, 3, 4], index=['A', 'B', 'C', 'D'])
s.str.cat([['A', 'B', 'C', 'D'], s, s.values, t.index])
x = pd.Series([1, 2, 3, 4], index=['A', 'B', 'C', 'D'])
s.str.cat([['A', 'B', 'C', 'D'], s, s.values, x.index])

Indexing with ``.str``
----------------------
Expand Down
0