pandas.Series.pop#

Series.pop(item)[源代码]#

从系列中退货和退货。如果未找到,则引发KeyError。

参数
item标签

需要删除的元素的索引。

退货
从序列中弹出的值。

示例

>>> ser = pd.Series([1,2,3])
>>> ser.pop(0)
1
>>> ser
1    2
2    3
dtype: int64