Live data from Hacker News

Modern Pandas (Part 2): Method Chaining

tomaugspurger.github.io

1–10 of 72 posts

Re: Modern Pandas (Part 2): Method Chaining

#4
Pandas may be OK for people who need to do a little data processing in their Python project, but I still recommend R and the tidyverse to those who need a serious tool of thought for analytics. Everything is so much more tidy and concise and intuitive and flexible. You can usually write code that directly expresses your high-level intent with a minimum of syntactic cruft.

Full disclosure - the downside of modern R is the stack traces have been getting worse for a while.

Re: Modern Pandas (Part 2): Method Chaining

#5

Pandas may be OK for people who need to do a little data processing in their Python project, but I still recommend R and the tidyverse to those who need a serious tool of thought for analytics. Everything is so much more tidy and concise and intuitive and flexible. You can usually write code that directly expresses your high-level intent with a minimum of syntactic cruft. Full disclosure - the downside of modern R is…

[deleted]

Re: Modern Pandas (Part 2): Method Chaining

#6

Pandas may be OK for people who need to do a little data processing in their Python project, but I still recommend R and the tidyverse to those who need a serious tool of thought for analytics. Everything is so much more tidy and concise and intuitive and flexible. You can usually write code that directly expresses your high-level intent with a minimum of syntactic cruft. Full disclosure - the downside of modern R is…

Significant part of the work is massaging data and R sucks at that compared to Python.

"if you want to do more than statistics, let’s say deployment and reproducibility, Python is a better choice." https://www.guru99.com/r-vs-python.html

Re: Modern Pandas (Part 2): Method Chaining

#7

Pandas may be OK for people who need to do a little data processing in their Python project, but I still recommend R and the tidyverse to those who need a serious tool of thought for analytics. Everything is so much more tidy and concise and intuitive and flexible. You can usually write code that directly expresses your high-level intent with a minimum of syntactic cruft. Full disclosure - the downside of modern R is…

It's intuitive to you but I have always found R a real pain to deal with. I acknowledge all of Pandas' flaws but R is not for me, and I've used it a lot in the past. It's all subjective and dependent on the context and requirements of a project.

Re: Modern Pandas (Part 2): Method Chaining

#8

Pandas may be OK for people who need to do a little data processing in their Python project, but I still recommend R and the tidyverse to those who need a serious tool of thought for analytics. Everything is so much more tidy and concise and intuitive and flexible. You can usually write code that directly expresses your high-level intent with a minimum of syntactic cruft. Full disclosure - the downside of modern R is…

There are a number of good packages in Python specializing in variations of powerful chained processing in Pandas. My own is this one: https://github.com/WinVector/data_algebra .

Re: Modern Pandas (Part 2): Method Chaining

#9
I was going to come here and post that I dislike method chaining because it is harder to read...

And then I read TFA and realize that I actually dislike people writing poorly formatted method chaining pandas code. The examples in the post are really nicely formatted and easy to read!

Re: Modern Pandas (Part 2): Method Chaining

#10
post #6

Pandas may be OK for people who need to do a little data processing in their Python project, but I still recommend R and the tidyverse to those who need a serious tool of thought for analytics. Everything is so much more tidy and concise and intuitive and flexible. You can usually write code that directly expresses your high-level intent with a minimum of syntactic cruft. Full disclosure - the downside of modern R is…

Significant part of the work is massaging data and R sucks at that compared to Python. "if you want to do more than statistics, let’s say deployment and reproducibility, Python is a better choice." https://www.guru99.com/r-vs-python.html

Depends on what kind of data. R is almost always better at tabular, Python is probably usually better at unstructured.
Post reply on HN