pandas.Series.str.decode
pandas 3.1.1 · Series and accessors · method
Decode byte strings to text with a selected character encoding.
Call syntax
Series.str.decode(encoding, errors='strict', dtype=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
encoding |
Required Positional or keyword |
str Name a text encoding such as "utf-8". |
errors |
Optional Positional or keyword Default 'strict' |
str Choose how to handle invalid input or failed operations. The available options depend on the API. |
dtype |
Optional Positional or keyword Default None |
str or dtype Choose the data type for the input conversion or result. |
Returns
Series or Index