Python Forum

Full Version: Translation of R Code to Python for Statistical Learning Course
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone, I'm totally new to Python and am currently taking a course on Statistical Learning which utilizes the Introduction to Statistical Learning book by Gareth James. I've linked the book below, which includes the R Code for each individual lab used in the course. I wanted to know if there might be a convenient resource that would offer exact translations for the Lab code links here from R to Python, or possibly even a resource somewhere specifically for this book with the necessary Python translations.

http://faculty.marshall.usc.edu/gareth-j.../code.html

Ideally I would like to use these labs as an opportunity to learn Python more in depth and practice, rather than with R. Alternatively, I could simply do the labs in R, would this benefit me toward learning Python later on in any way?

Any help would be very much appreciated, your time means a lot. Thank you!
You might take a look at :
"import r2python"

Paul
I'd suggest just doing the labs in R, unless your course has given you a choice. If you've not done any programming before, then it'll make it easier. Of course, learning one language makes it easier to learn another down the line.