pandas.Series.str.decode
- Series.str.decode(encoding, errors='strict')[source]
-
Декодирование строковых значений в Series/Index с использованием указанной кодировки.
Эквивалентно
str.decode()в python2 иbytes.decode()в python3.- Параметры:
-
- encoding:str
- errors:str, необязательно
- Возвращает:
-
- Series или Index
Примеры
Для Series:
>>> ser = pd.Series([b'cow', b'123', b'()']) >>> ser.str.decode('ascii') 0 cow 1 123 2 () dtype: object
© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.2.2/reference/api/pandas.Series.str.decode.html