pandas.Series.str.decode #
- 系列.str。解码(编码,错误= '严格' ) [来源] #
使用指定的编码解码系列/索引中的字符串。
相当于
str.decode()
python2和bytes.decode()
python3中的。- 参数:
- 编码字符串
- 错误str,可选
- 返回:
- 系列或索引
例子
对于系列:
>>> ser = pd.Series([b'cow', b'123', b'()']) >>> ser.str.decode('ascii') 0 cow 1 123 2 () dtype: object