4
$\begingroup$

From what I can tell, R and Python are the two most popular languages for data science.

My question is which one would you recommend for someone just starting out in data science? Does any one have any clear advantages on the other? Is any one easier to learn or does any one have more potential?

Thanks a lot!

$\endgroup$
1
  • 1
    $\begingroup$ Programming language is just a tool not everything! I will vow for R as it's more versatile than Python is as of now but 1st and foremost, basics matter, Programming Languages don't...... Today you have Put,R's hype tomorrow they may be obsolete because of Julia maybe.. $\endgroup$ – Aditya Sep 13 '18 at 22:29
2
$\begingroup$

It's a perennial debate. Python is more readable and quicker to learn, no question. It's also a bit more general-purpose language than R. R, on the other hand, has special statistical packages for just about anything you could even dream of doing. There are some stats it can do that Python doesn't have a library for (though I suspect people are working on that).

What's more important in the early stages of learning data science is the more fundamental theory: mathematics, linear algebra, calculus, and statistics. A firm grasp of those areas is a considerably larger share of the learning path than a particular language.

Having said that, I do happen to prefer Python because of the readability. The fact is, that very often other people will need to come in after you and read what you wrote. For that matter, you sometimes have to read your own code! Readability is more important than the ability to do fantastic things with one-liners. As for the advanced stats, that comes into play most often in the medical fields; there you definitely find a preponderance of R over Python.

$\endgroup$
0
2
$\begingroup$

I think we might give you an infinite variety of answers, because each of us had a difference experience, different backgrounds and stories to tell. IMHO, the question itself has a serious problem: why choosing? Do you choose between a hammer and a nail to put a frame on the wall? No, because both are tools, as Python and R. Obviously, you would start learning only one of those but in the end, I would suggest learning both of them because, at least today, they are complementary. In my experience (scientific background, working with energy and climate data), Python is very good in handling large gridded datasets thanks to xarray and in performing fast computation, on the other hand I use R when I need the "last mile", i.e. when I have to process the data to visualize it (ggplot2 to day is the top library for data exploration and visualization) and to present it (the shiny library is very very easy to learn and effective). But while R syntax can be ugly and not consistent, Python is very elegant and definitely a modern programming language, the best solution when you need to write a lot of code with a OOP paradigm.

So the question would be: which one I should learn first? It depends: why are you learning it? Do you have already a project? If you still don't have a clear idea, I would suggest attending the first R and Python courses in Datacamp and then choosing where to start.

$\endgroup$
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.