Assign desired index to given axis.
Indexes for row labels can be changed by assigning a list-like or Index.
The values for the new index.
The axis to update. The value 0 identifies the rows. For Series this parameter is unused and defaults to 0.
Whether to make a copy of the underlying data.
Note
The copy keyword will change behavior in pandas 3.0. Copy-on-Write will be enabled by default, which means that all methods with a copy keyword will use a lazy copy mechanism to defer the copy and ignore the copy keyword. The copy keyword will be removed in a future version of pandas.
You can already get the future behavior and improvements through enabling copy on write pd.options.mode.copy_on_write = True
An object of type Series.
Examples
>>> s = pd.Series([1, 2, 3]) >>> s 0 1 1 2 2 3 dtype: int64
>>> s.set_axis(['a', 'b', 'c'], axis=0) a 1 b 2 c 3 dtype: int64
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4