Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.Series.str.decode#

Series.str.decode(encoding,errors='strict',dtype=None)[source]#

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

Equivalent tostr.decode() in python2 andbytes.decode() inpython3.

Parameters:
encodingstr
errorsstr, optional

Specifies the error handling scheme.Possible values are those supported bybytes.decode().

dtypestr or dtype, optional

The dtype of the result. When notNone, must be either a string orobject dtype. WhenNone, the dtype of the result is determined bypd.options.future.infer_string.

Added in version 2.3.0.

Returns:
Series or Index

Examples

For Series:

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

[8]ページ先頭

©2009-2025 Movatter.jp