fbpx

Python vs. R: Best for Data Scientists and Analysts?

A Macbook with lines of Python code open

ARTICLE SUMMARY

Rashida Nasrin Sucky, data scientist and MS Student, answers the very common question of whether Python or R is better for data scientists or data analysts. And where to start.

Straightforward and Easy Reasoning

0_ICxpRQyA6nz7RzVq.jpg
This is a very common question. Especially for the starters. Where to start? Even for intermediate-level data scientists, this can be a question. Because different people have different choices or different styles of work. Some companies prefer Python and some companies prefer R. I have friends who learned to start Python first and then some recruiters or some employers said they should learn R. Now they start learning R. Actually which one is better?

I started with Python. As I started my MS at Boston University, I had to learn R. Because some of the data analytics courses use R only. It was uncomfortable in the beginning. Now I am happy that I got to learn R. As I know Python and R both now, I thought I should share my opinion here.



My Own Experience

As I knew Python pretty well, I could learn R fast. It wasn’t too hard. Especially, if you know the data manipulation libraries in Python, you may find many commands similar(not the same). So learning wasn’t hard. But still, it takes time. It takes a lot of practice. Because so many libraries are available out there for data manipulation and analysis, it is challenging to keep up sometimes for beginners. But it becomes easier pretty soon.

But the question is, is it worth the time?

For me, yes!

Python is pretty strong. You can manage pretty much most of the staff in Python that is available in R. But knowing R will give you a lot of flexibility. A lot of libraries are just better structured in R than Python. If you are good at both of them, you will have options. For example, I like to use R for inferential statistics than Python. I feel like the libraries and packages in R are better than the packages in Python. It is just my opinion. I almost always use R for statistical analysis. Some may like ggplot2 better than Matplotlib and Seaborn. Again, if I need to use a machine learning library, I prefer Python’s scikit-learn library more than different R packages.

At this point, I feel, for intermediate-level learners, it is good to learn both Python and R. It will open a lot of avenues if you are a freelancer or a job seeker.

Where to Start for Beginners

In my opinion, it is good to start with Python. If you are an aspiring data scientist and learning your first language, that should be python. Simply because python is more popular. Also, I find more resources out there for Python. If you look at popular sites for programmers like Geeks for Geekstutorials point, or programiz, you will see that they have solutions in several different languages. Python is one of them. But you won’t find R there. So, learning will be much easier. Also if you get stuck, you will find help faster in Python.

If you are a data analyst, Python or R either one will work for you to complete your tasks. But if you are a data scientist and also want to go deeper into machine learning and artificial intelligence with time, then you should definitely choose Python. Because you might have to collaborate with software engineers. You won’t find many software engineers who would like to work in R. Also all the good online courses or master’s programs I have seen till now teach machine learning using Python.

Last Word

As you can see, I emphasized a lot on learning Python. But again, if possible, learn both of them. If you want to work as a data analyst, either Python or R will do. But If you are planning to be a data scientist, Python is recommended. Learning both is even better! My suggestion is, learn one very well first.


Rashida Nasrin Sucky, Data Scientist and MS Student at Boston University.Rashida Nasrin Sucky, Data Scientist and MS Student at Boston University.

Author: Rashida Nasrin Sucky, Data Scientist, and MS Student

You can follow Rashida and her work on her various social channels:

Twitter, Instagram, LinkedIn

RELATED ARTICLES

Discover the journey of Marta Dies, Lead Data Scientist at Vista, as she transitions from a scientific researcher in Complex Systems to solving real-world challenges...
Discover how a career shift from chemistry to software engineering led one professional to Quantexa's Academy Programme. Gain insights into learning Scala, overcoming technical challenges,...
SheCanCode has partnered with coding education platform Programiz PRO to provide free subscriptions to our women in tech members.
Join us in this captivating journey as we delve into the life and career of Mansi Baguant, a talented graduate data scientist at Arup. In...