xorbits.pandas.Series.str.decode#

Series.str.decode(encoding, errors: str = 'strict')#

Decode character string in the Series/Index using indicated encoding.

Equivalent to str.decode() in python2 and bytes.decode() in python3.

参数
  • encoding (str) –

  • errors (str, optional) –

返回类型

Series or Index

实际案例

For Series:

>>> ser = pd.Series([b'cow', b'123', b'()'])  
>>> ser.str.decode('ascii')  
0   cow
1   123
2   ()
dtype: object

This docstring was copied from pandas.core.strings.accessor.StringMethods.