Hacker News new | ask | show | jobs
by SubiculumCode 737 days ago
Is this the dplyR use case in R? Is there dplyPython for Numpy?
1 comments

You mean the pipe operator from Magrittr %>%, and the R 4.0 built-in operator |>?

Pandas has a .pipe(fn) method, but without the lazy evaluation to enable the R symbol capturing magic, the syntax is pretty clunky and not particularly useful. The closest approximation is method chaining, which at least is more consistently available in Pandas than in Numpy.

If you're talking about Dplyr "verbs" then no, there's nothing quite like that in Python, but it's much less necessary in Pandas or Polars than in R, because the set of standard tools for working with data frames in the bear libraries is much richer than in the R standard library.