pandas.Series.str.encode

Series.str.encode(encoding, errors='strict')

Encode character string to some other encoding using indicated encoding

Parameters:

encoding : string

errors : string

Returns:

encoded : array