Basic Pandas Data Structures

Give Feedback

Comments & Discussion

Bill Sewell on March 14, 2019

xrange threw me an error (name xrange is not defined), but range worked. Why would it work in your example but not mine?

Dan Bader RP Team on March 16, 2019

@Bill: That’s because this video series uses Python 2.x, and xrange is no longer available in Python 3.x, where you’d use the range function. Some more info here.

Sciencificity on March 16, 2019

Hi Dan, With Python 2.x not being supported from 2020 shouldn’t all the video tutorials on RP be for Python 3.x now? That would be really appreciated - being someone new to python I googled this to figure out why mine did not work, but my expectation going in was that I would be watching an up-to-date pandas tutorial, and then I got disappointed when I figured out it was 2.x being used, hence the error. I had similar issues with the stocks data pull and vincent (the last exercise in this tutorial) and that led me to give up and not bother googling further - and I would have really loved to complete that exercise! Thanks.

Dan Bader RP Team on March 16, 2019

shouldn’t all the video tutorials on RP be for Python 3.x now?

I agree and our upcoming tutorials will all use Python 3 :) That said, I think there’s still a benefit to having some Python 2.x specific content available, but it needs a better disclaimer at the start of the course. I’ll work on adding those!

Become a Member to join the conversation.