Skip to content

Fix for GH 6885 - get_dummies chokes on unicode values #6975

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
wants to merge 4 commits into from
Closed

Fix for GH 6885 - get_dummies chokes on unicode values #6975

wants to merge 4 commits into from

Conversation

maxgrenderjones
Copy link
Contributor

closes #6885

Please be gentle - this is the first time I've tried to contribute either to someone else's python project or another project on github, so if my python or git foo is lacking, I apologise in advance!

@maxgrenderjones
Copy link
Contributor Author

Note that the failed test wasn't related to my changes:

pandas.io.data.RemoteDataError: Parsed URL 'http://finance.yahoo.com/q/op?s=AAPL&m=2014-05' has no rootelement

@jreback jreback added this to the 0.14.0 milestone Apr 27, 2014
@jreback
Copy link
Contributor

jreback commented Apr 27, 2014

can you add a release note in Bug Fixes referecing this issue, otherwise looks good

@hayd @TomAugspurger ok by you?

eacute = unicodedata.lookup('LATIN SMALL LETTER E WITH ACUTE')
s = [e, eacute, eacute]
res = get_dummies(s, prefix='letter')
print(res)
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this print in here just for debugging? It's not actually checking anything right? You should remove it if so.

@TomAugspurger
Copy link
Contributor

The travis failure looked like an unrelated yahoo test. I restarted it on Travis (I think that's a new feature). We'll see if Github notices and updates with the results.

@maxgrenderjones
Copy link
Contributor Author

Apologies for the stray print - I'll remove that and then add the edit in bugfixes

@jreback
Copy link
Contributor

jreback commented Apr 28, 2014

@maxgrenderjones did you force push? (your old commit is still here)

@@ -270,6 +270,7 @@ Improvements to existing features
Bug Fixes
~~~~~~~~~

- Bug causing UnicodeEncodeError when get_dummies called with unicode values and a prefix (:issue:`6885`)
Copy link
Contributor

Choose a reason for hiding this comment

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

usually we put the new fixes at the end, but this is ok

@jreback
Copy link
Contributor

jreback commented Apr 29, 2014

ping me when green

@maxgrenderjones
Copy link
Contributor Author

Last code-changing build is green - don't know if travis bothers building if you just change docs.

Apologies that a 4 character change took four commits!

@jreback
Copy link
Contributor

jreback commented Apr 30, 2014

merged via 7918d60

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Strings String extension data type and string data Unicode Unicode strings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_dummies chokes on unicode values
3 participants