Coder Social home page Coder Social logo

Comments (5)

brandon-rhodes avatar brandon-rhodes commented on August 19, 2024

Do you have a single example you could share, of a result that is coming out differently? Maybe I could schedule an annual update to the tutorial materials so that the answers do not drift too far from the data coming from IMDB!

from pycon-pandas-tutorial.

davidsands avatar davidsands commented on August 19, 2024

The IMDB data is fine, but there seems to be a problem with the notebook viewer, which caused me to think that data was corrupted. (Also, the actual actor names have dollar signs in them, which I wasn't expecting.) Here are a couple of screen-shots of what "Solutions-1" looks like in Firefox and Google Chrome on Ubuntu 14.04.

screenshot_2016-03-31_16-37-48
screenshot_2016-03-31_16-41-20

from pycon-pandas-tutorial.

brandon-rhodes avatar brandon-rhodes commented on August 19, 2024

Yes, I also had not known that actor names can have dollar signs in them!

http://www.imdb.com/name/nm0790001/

It does look like the dollar sign is confusing the rendering of your HTML. Try this: instead of saying just

cast.head()

instead try outputting it as plain text with print():

print(cast.head())

If the print() version works fine, then I think this is a bug with the notebook viewer. If the print() version has these extra angle brackets and raw HTML code inside, then it may be a problem I have to tackle with the data. Thanks for the screenshots, this makes your issue much clearer!

from pycon-pandas-tutorial.

iaindinw avatar iaindinw commented on August 19, 2024

Just for information, I am having similar issues on windows (that probably complicates rather than helps). I tried printing but has doesn't appear to fix the problem so it may be the data. I'm using python 3 so the default encoding is already UTF-8 and there aren't any errors, just some weird results!

I'd also just like to say thank you for the fantastic tutorial, it really is excellent!

image

from pycon-pandas-tutorial.

brandon-rhodes avatar brandon-rhodes commented on August 19, 2024

Those question marks are, alas, deliberate:

https://github.com/brandon-rhodes/pycon-pandas-tutorial/blob/master/build/BUILD.py#L220

They are how I handle actors and actresses with accented characters in their names, since my early attempts to get their Unicode characters to render correctly resulted in terrible errors under Windows when the tutorial was run with Python 2. As long as I want to support that combination — and at the moment I do — we need some stand-in character for the unprintable ones.

Maybe someday I should use two-character combinations, like 'A for Á and so forth, and welcome a contribution that would accomplish that — but for now I am going to stick with the ? since it was quick and seems to make everything work.

Sorry that the special-character handling looked confusing!

from pycon-pandas-tutorial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.