mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-31 06:07:44 +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)
|
||||
)
|
||||
|
||||
let data_dfr = ($data | dfr into-df)
|
||||
$data_dfr |
|
||||
dfr group-by name |
|
||||
dfr agg [(dfr col commits | dfr sum | dfr as "all_commits")] |
|
||||
dfr collect |
|
||||
dfr sort-by all_commits |
|
||||
dfr reverse |
|
||||
dfr into-nu |
|
||||
first 50
|
||||
let data_polars = ($data | polars into-df)
|
||||
$data_polars |
|
||||
polars group-by name |
|
||||
polars agg [(polars col commits | polars sum | polars as "all_commits")] |
|
||||
polars collect |
|
||||
polars sort-by all_commits |
|
||||
polars reverse |
|
||||
polars into-nu |
|
||||
first 75
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue