def str_decode(arr, encoding, errors="<STR_LIT:strict>"):
if encoding in _cpython_optimized_decoders:<EOL><INDENT>f = lambda x: x.decode(encoding, errors)<EOL><DEDENT>else:<EOL><INDENT>decoder = codecs.getdecoder(encoding)<EOL>f = lambda x: decoder(x, errors)[<NUM_LIT:0>]<EOL><DEDENT>return _na_map(f, arr)<EOL>
Decode character string in the Series/Index using indicated encoding.
Equivalent to :meth:`str.decode` in python2 and :meth:`bytes.decode` in
python3.

Parameters
----------
encoding : str
errors : str, optional

Returns
-------
Series or Index