|
|
|
|
|
by aorist
1247 days ago
|
|
The ergonomics of grouping and aggregation in R are really much better because libraries can make of its non-standard evaluation[^0] (which in other cases also makes the language a nightmare to deal with). Compare: pd_df.groupby(['date'])['failure'].count() # pandas
pl_df.groupby(pl.col('date')).agg(pl.count('failure')) # polars
dt[, .N, date] # R data.table
In both Pandas and Polars, the specification of the date has to be a string inside a list or method call, but in R it can be a bare token.[^0]: http://adv-r.had.co.nz/Computing-on-the-language.html |
|
R is not a replacement for pandas.
R is it’s own special little painful ecosystem, loved by people who don’t have to maintain the code they write.
You can complain all you like about pandas, but at the end of the day, it’s python. Python tooling works with it. The python ecosystem works with it.
It’s not without faults, but at least you’ll have a community of people to help when things go wrong.
R, not so much.
(Spoken as jaded developer who had to support r on databricks, which is deep in the hell of “well, it’s not really a tier one language” even from their support team)