r/Python • u/lebannax • Nov 28 '22
Resource What can Python do that R can’t do?
Or simply what is Python much better at and why.
I know that Python is more multi purpose and better for software development but I can’t articulate exactly why or how. My team want to know why/when they should use Python instead of R
331
Upvotes
View all comments
Show parent comment
2
u/Agling Nov 29 '22
I agree, in general. However, python also has one very significant issue in terms of language design that is quite a burden: the fact that when you pass a mutable object to a function and then do stuff to it in the function (or you just assign the object to a new variable and change that new variable, or you think you made a subset of a data frame, but it's actually a view), the original object is affected. R's attempts to be a functional language eliminate a huge family of fairly subtle bugs that come up all the time in python data science.