pandas: powerful Python data analysis toolkit - 1.0.0variables (GH23573, GH30959) • Series.map() now accepts collections.abc.Mapping subclasses as a mapper (GH29733) • Added an experimental attrs for storing global metadata about a dataset (GH29062) • 1 >>> df.rename(mapper={0: 1}, index={0: 2}) 0 2 1 pandas 1.0.0 >>> df.rename({0: 1}, index={0: 2}) Traceback (most recent call last): ... TypeError: Cannot specify both 'mapper' and any of 'index' 'index' or 'columns' >>> df.rename(mapper={0: 1}, index={0: 2}) Traceback (most recent call last): ... TypeError: Cannot specify both 'mapper' and any of 'index' or 'columns' You can still change the axis0 码力 | 3015 页 | 10.78 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.21.1Fixes • Silenced a warning on some Windows environments about “tput: terminal attributes: No such device or address” when detecting the terminal size. This fix only applies to python 3 (GH16496) • Bug DataFrame.rename() also supports an “axis-style” calling convention, where you specify a single mapper and the axis to apply that mapping to. In [258]: df.rename({'one': 'foo', 'two': 'bar'}, axis='columns'}) sparseness conversions); is a view groupby([by, axis, level, as_index, sort, ...]) Group series using mapper (dict or key function, apply given function to group, return result as series) or by a series of0 码力 | 2207 页 | 8.59 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.24.0DataFrame.rename() also supports an “axis-style” calling convention, where you specify a single mapper and the axis to apply that mapping to. In [242]: df.rename({'one': 'foo', 'two': 'bar'}, axis='columns') previous page groupby([by, axis, level, as_index, sort, ...]) Group DataFrame or Series using a mapper or by a Series of columns. gt(other[, level, fill_value, axis]) Greater than of series and other matching indices as other ob- ject. rename([index]) Alter Series index labels or name. rename_axis([mapper, index, columns, axis, . . . ]) Set the name of the axis for the index or columns. reorder_levels(order)0 码力 | 2973 页 | 9.90 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.25.0DataFrame.rename() also supports an “axis-style” calling convention, where you specify a single mapper and the axis to apply that mapping to. In [238]: df.rename({'one': 'foo', 'two': 'bar'}, axis='columns') conversions); is a view. groupby(self[, by, axis, level, as_index, ...]) Group DataFrame or Series using a mapper or by a Series of columns. gt(self, other[, level, fill_value, axis]) Return Greater than of series as other ob- ject. rename(self[, index]) Alter Series index labels or name. rename_axis(self[, mapper, index, columns, ...]) Set the name of the axis for the index or columns. reorder_levels(self, order)0 码力 | 2827 页 | 9.62 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.25.1DataFrame.rename() also supports an “axis-style” calling convention, where you specify a single mapper and the axis to apply that mapping to. In [238]: df.rename({'one': 'foo', 'two': 'bar'}, axis='columns') conversions); is a view. groupby(self[, by, axis, level, as_index, ...]) Group DataFrame or Series using a mapper or by a Series of columns. gt(self, other[, level, fill_value, axis]) Return Greater than of series as other ob- ject. rename(self[, index]) Alter Series index labels or name. rename_axis(self[, mapper, index, columns, ...]) Set the name of the axis for the index or columns. reorder_levels(self, order)0 码力 | 2833 页 | 9.65 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0DataFrame.rename() also supports an “axis-style” calling convention, where you specify a single mapper and the axis to apply that mapping to. In [243]: df.rename({'one': 'foo', 'two': 'bar'}, axis='columns') object for given key (ex: DataFrame column). groupby(self[, by, axis, level]) Group Series using a mapper or by a Series of columns. gt(self, other[, level, fill_value, axis]) Return Greater than of series rename(self[, index, axis, copy, inplace, ...]) Alter Series index labels or name. rename_axis(self[, mapper, index, columns, ...]) Set the name of the axis for the index or columns. reorder_levels(self, order)0 码力 | 3091 页 | 10.16 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0.4DataFrame.rename() also supports an “axis-style” calling convention, where you specify a single mapper and the axis to apply that mapping to. In [243]: df.rename({'one': 'foo', 'two': 'bar'}, axis='columns') object for given key (ex: DataFrame column). groupby(self[, by, axis, level]) Group Series using a mapper or by a Series of columns. gt(self, other[, level, fill_value, axis]) Return Greater than of series rename(self[, index, axis, copy, inplace, ...]) Alter Series index labels or name. rename_axis(self[, mapper, index, columns, ...]) Set the name of the axis for the index or columns. reorder_levels(self, order)0 码力 | 3081 页 | 10.24 MB | 1 年前3
pandas: powerful Python data analysis toolkit -1.0.3DataFrame.rename() also supports an “axis-style” calling convention, where you specify a single mapper and the axis to apply that mapping to. In [243]: df.rename({'one': 'foo', 'two': 'bar'}, axis='columns') object for given key (ex: DataFrame column). groupby(self[, by, axis, level]) Group Series using a mapper or by a Series of columns. gt(self, other[, level, fill_value, axis]) Return Greater than of series rename(self[, index, axis, copy, inplace, ...]) Alter Series index labels or name. rename_axis(self[, mapper, index, columns, ...]) Set the name of the axis for the index or columns. reorder_levels(self, order)0 码力 | 3071 页 | 10.10 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.2.3DataFrame.rename() also supports an “axis-style” calling convention, where you specify a single mapper and the axis to apply that mapping to. 200 Chapter 2. User Guide pandas: powerful Python data analysis 314 kind = inspect.Parameter.POSITIONAL_OR_KEYWORD /pandas/pandas/core/frame.py in rename(self, mapper, index, columns, axis, copy, ˓→inplace, level, errors) (continues on next page) 2.11. Duplicate 4439 4 3 6 4440 """ -> 4441 return super().rename( 4442 mapper=mapper, 4443 index=index, /pandas/pandas/core/generic.py in rename(self, mapper, index, columns, axis, copy, ˓→inplace, level, errors)0 码力 | 3323 页 | 12.74 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.2DataFrame.rename() also supports an “axis-style” calling convention, where you specify a single mapper and the axis to apply that mapping to. 232 Chapter 2. User Guide pandas: powerful Python data analysis 326 kind = inspect.Parameter.POSITIONAL_OR_KEYWORD /pandas/pandas/core/frame.py in rename(self, mapper, index, columns, axis, copy, ˓→inplace, level, errors) (continues on next page) 2.11. Duplicate 5032 4 3 6 5033 """ -> 5034 return super().rename( 5035 mapper=mapper, 5036 index=index, /pandas/pandas/core/generic.py in rename(self, mapper, index, columns, axis, copy, ˓→inplace, level, errors)0 码力 | 3509 页 | 14.01 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













