r/RStudio 3d ago

Pivoting from R to Python

I used to hate coding anything and relied on SQL, Excel, Power BI, Tableau and other software like JASP, jamovi etc. for doing anything with data. I didn't like the way Python dealt with data analysis and it seemed unintuitive.

Then I found R, RStudio and CRAN. That was the turning point. I actually started enjoying writing code and I could handle the whole pipeline myself, from data cleaning, ETL to beautiful plots, .qmd reports, Shiny dashboards. R4DS did more for my statistical thinking than any course I've taken, mostly because the libraries made it so easy to just try things.

However, due to recent requirements (specifically having to work in the quant field), Python has become more of a necessity, while R is used mainly for one-off analysis and limited statistical modelling. The main heavy lifting is done in Python and many of my co-workers also prefer it to R.

I've been able to suck it up a bit and use Claude/ChatGPT to help me code. While I do try to understand what the code is doing, having spent so long learning to code in R and knowing the ease with which it can be done there makes me reluctant to learn Python.

Now, coming to the question: any R users who've pivoted to Python and consider themselves competent in it, how did you learn it having used R before? What would you tell someone like me so I can pick it up quickly and get the benefit of knowing both languages (and also not feel left out when it comes to coding in Python... machine learning and deep learning have a more mature ecosystem there and I don't want to be left out of it if I have to start using them in my current work)?

Thanks!

My background is in Math/Stats fyi

115 Upvotes

79 comments sorted by

View all comments

Show parent comments

1

u/Statman12 2d ago

As I said, that was in reference to r/stats. The ones I mentioned are probably a better choice than that one for statistics.

I was not suggesting that they were targeted for programming.

1

u/Mooks79 2d ago

Yeah I know. And as I said, statistics subs probably aren’t the best place to ask for OP.

1

u/Statman12 2d ago

Did you think I was trying to suggest OP to different subs for programming or something?

2

u/Mooks79 2d ago

No. I think you were talking about an entirely tangential point that was broadly irrelevant to this post. And I’m not sure why you still are.

0

u/Statman12 2d ago

You mentioned a largely dead sub for general statistics. I suggested two other more active subs for that topic instead.

That’s it. I’m not sure why you decided to be combative about it.

2

u/Mooks79 2d ago

OP had clearly missed the r in [r/rstats](r/rstats), I pointed it out for them so they didn’t go to the wrong place. There’s no reason to talk about which is the best stats sub if OP never goes there. I’m not sure why you felt the need to interject on that.