8000 encode/decode method for string module (like in np.char.encode ) · Issue #1706 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content 10BC0

encode/decode method for string module (like in np.char.encode ) #1706

@gerigk

Description

@gerigk

This is already in included in numpy but for convenience it would be nice to have this in pandas.

series.str.decode('utf-8')

is nicer than for example

series = Series(['a','b','ä'])
Series(np.char.decode(series.values.astype('|S255'), 'utf-8'))

I find myself having to decode and encode a lot depending on what other libraries accept/return.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0