4 ms·
For even simpler data management in R, the author may have a alook at the `data.table` package [1]. His example would then be library(data.table) dt <-
by karencarits 3y ago
For even simpler data management in R, the author may have a alook at the `data.table` package [1]. His example would then be
library(data.table)
dt <- fread("purchases.csv")
dt[, .(total = sum(amount - discount)), by = "country"]
and much faster to run
[1] https://rdatatable.gitlab.io/data.table/ https://rdatatable.gitlab.io/data.table/
- a_bonobo 3y agoSimilarly, for me as an R person `polars` feels a bit more like R than `pandas` q = ( pl.scan_csv("docs/data/iris.csv") .filter(pl.col("sepal_length") > 5) .group_by("species") .agg(pl.all().sum()) ) df = q.collect()