Skip to content

REGR: Series.str.encode("base64") #32080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins added Regression Functionality that used to work in a prior pandas version Strings String extension data type and string data labels Feb 18, 2020
@simonjayhawkins simonjayhawkins added this to the 1.0.2 milestone Feb 18, 2020
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if u saw @TomAugspurger comments

you can’t encode bytes only decode them

@simonjayhawkins
Copy link
Member Author

not sure if u saw @TomAugspurger comments

you can’t encode bytes only decode them

see #32048 (comment)

@jreback
Copy link
Contributor

jreback commented Feb 18, 2020

not sure if u saw @TomAugspurger comments
you can’t encode bytes only decode them

see #32048 (comment)

maybe i don’t understand you comment
you can’t encode this in the standard library
why should we allow it

@simonjayhawkins
Copy link
Member Author

we don't use the standard library. we use codecs so maybe we need a deprecation warning.

@jreback
Copy link
Contributor

jreback commented Feb 18, 2020

we don't use the standard library. we use codecs so maybe we need a deprecation warning.

no the point is we shouldn’t do this at all

if you have bytes you can’t encode
i am not sure why that would be an option that is exposed

@simonjayhawkins
Copy link
Member Author

IIUC it's a regression. and if we don't want to allow it we should have a deprecation cycle.

@simonjayhawkins
Copy link
Member Author

@jreback is it worth fixing up the tests and adding a special case for base64 encoding or is this a non-starter.

@jreback
Copy link
Contributor

jreback commented Feb 18, 2020

this was done on purpose. i see no reason to change anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Functionality that used to work in a prior pandas version Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pandas 1.0.1 gives 1953 TypeError: Cannot use .str.encode with values of inferred dtype 'bytes'.
2 participants