mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
update 20k club script to use polars (#1037)
I've been using these updates for a while but never committed them.
This commit is contained in:
parent
d6b202ce83
commit
cfcd816335
1 changed files with 9 additions and 9 deletions
|
@ -79,15 +79,15 @@ def get_pr_counts [debug_csv: bool, repos_root_folder = '/Users/fdncred/src'] {
|
||||||
append (open vscode.csv)
|
append (open vscode.csv)
|
||||||
)
|
)
|
||||||
|
|
||||||
let data_dfr = ($data | dfr into-df)
|
let data_polars = ($data | polars into-df)
|
||||||
$data_dfr |
|
$data_polars |
|
||||||
dfr group-by name |
|
polars group-by name |
|
||||||
dfr agg [(dfr col commits | dfr sum | dfr as "all_commits")] |
|
polars agg [(polars col commits | polars sum | polars as "all_commits")] |
|
||||||
dfr collect |
|
polars collect |
|
||||||
dfr sort-by all_commits |
|
polars sort-by all_commits |
|
||||||
dfr reverse |
|
polars reverse |
|
||||||
dfr into-nu |
|
polars into-nu |
|
||||||
first 50
|
first 75
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue