Skip to content

Update documentation for rename #13533

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 1 commit into from
Jun 30, 2016
Merged

Update documentation for rename #13533

merged 1 commit into from
Jun 30, 2016

Conversation

gliptak
Copy link
Contributor

@gliptak gliptak commented Jun 30, 2016

@jreback
Copy link
Contributor

jreback commented Jun 30, 2016

needs an update to the doc string as well

@gliptak
Copy link
Contributor Author

gliptak commented Jun 30, 2016

Updated docstring

@codecov-io
Copy link

codecov-io commented Jun 30, 2016

Current coverage is 84.33%

Merging #13533 into master will not change coverage

@@             master     #13533   diff @@
==========================================
  Files           138        138          
  Lines         51111      51111          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43107      43107          
  Misses         8004       8004          
  Partials          0          0          

Powered by Codecov. Last updated by 3944a36...8402b95

@@ -555,8 +555,8 @@ def swaplevel(self, i=-2, j=-1, axis=0):
_shared_docs['rename'] = """
Alter axes input function or functions. Function / dict values must be
unique (1-to-1). Labels not contained in a dict / Series will be left
as-is. Alternatively, change ``Series.name`` with a scalar
value (Series only).
as-is. Extra labels listed don't throw an error. Alternatively, change
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 add 1 or more examples in Examples

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@jreback jreback added the Docs label Jun 30, 2016

.. ipython:: python

df.rename(columns={'one' : 'foo', 'two' : 'bar'},
index={'a' : 'apple', 'b' : 'banana', 'd' : 'durian'})

If mapping doesn't name a column/index, it isn't renamed. Also extra names
Copy link
Member

Choose a reason for hiding this comment

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

"If mapping doesn't name a column/index," -> "If the mapping doesn't include a column/index label"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you. corrected

@jorisvandenbossche
Copy link
Member

@gliptak A small grammatical comment, otherwise looks good!

@jorisvandenbossche jorisvandenbossche added this to the 0.18.2 milestone Jun 30, 2016
@jorisvandenbossche jorisvandenbossche merged commit e8e0aae into pandas-dev:master Jun 30, 2016
@jorisvandenbossche
Copy link
Member

Thanks!

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.

ENH: add errors='raise' option to rename
4 participants