@@ -487,24 +487,31 @@ def _expand_axes(self, key):
487
487
488
488
return new_axes
489
489
490
- _shared_docs ['set_axis' ] = """Assign desired index to given axis
490
+ _shared_docs ['set_axis' ] = """
491
+ Assign desired index to given axis.
492
+
493
+ Indexes for columns or rows can be changed by assigning
494
+ a list-like or Index.
491
495
492
496
Parameters
493
497
----------
494
- labels: list-like or Index
495
- The values for the new index
496
- axis : int or string, default 0
498
+ labels : list-like, Index
499
+ The values for the new index.
500
+
501
+ axis : {0 or 'index', 1 or 'columns'}, default 0
502
+ The value 0 indentify the rows, 1 identify the columns.
503
+
497
504
inplace : boolean, default None
498
505
Whether to return a new %(klass)s instance.
499
506
500
507
WARNING: inplace=None currently falls back to to True, but
501
508
in a future version, will default to False. Use inplace=True
502
509
explicitly rather than relying on the default.
503
510
504
- .. versionadded:: 0.21.0
505
- The signature is make consistent to the rest of the API.
506
- Previously, the "axis" and "labels" arguments were respectively
507
- the first and second positional arguments.
511
+ .. versionadded:: 0.21.0
512
+ The signature is make consistent to the rest of the API.
513
+ Previously, the "axis" and "labels" arguments were respectively
514
+ the first and second positional arguments.
508
515
509
516
Returns
510
517
-------
@@ -513,7 +520,7 @@ def _expand_axes(self, key):
513
520
514
521
See Also
515
522
--------
516
- pandas.NDFrame.rename
523
+ pandas.DataFrame.rename_axis : Alter the name of the index or columns.
517
524
518
525
Examples
519
526
--------
@@ -545,7 +552,6 @@ def _expand_axes(self, key):
545
552
0 1 4
546
553
1 2 5
547
554
2 3 6
548
-
549
555
"""
550
556
551
557
@Appender (_shared_docs ['set_axis' ] % dict (klass = 'NDFrame' ))
0 commit comments