_set_axis_name(self, name, axis=0, inplace=False)
Name(s) to set.
The axis to set the label. The value 0 or 'index' specifies index, and the value 1 or 'columns' specifies columns.
If :None:None:`True`
, do operation inplace and return None.
The same type as the caller or :None:None:`None`
if :None:None:`inplace`
is :None:None:`True`
.
Set the name(s) of the axis.
DataFrame.rename
Alter the axis labels of :None:class:`DataFrame`
.
Index.rename
Set the name of :None:class:`Index`
or :None:class:`MultiIndex`
.
Series.rename
Alter the index labels or set the index name of :None:class:`Series`
.
>>> df = pd.DataFrame({"num_legs": [4, 4, 2]},This example is valid syntax, but we were not able to check execution
... ["dog", "cat", "monkey"])
... df num_legs dog 4 cat 4 monkey 2
>>> df._set_axis_name("animal") num_legs animal dog 4 cat 4 monkey 2This example is valid syntax, but we were not able to check execution
>>> df.index = pd.MultiIndex.from_product(See :
... [["mammal"], ['dog', 'cat', 'monkey']])
... df._set_axis_name(["type", "name"]) num_legs type name mammal dog 4 cat 4 monkey 2
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them