Scheme (R6RS) Dataframe Library¶
A dataframe record type with procedures to select, drop, and rename columns, and filter, sort, split, bind, append, join, reshape, and aggregate dataframes.
Quick Example¶
(import (dataframe))
(define df
(make-df*
(grp 'a 'a 'b 'b 'b)
(trt 'a 'b 'a 'b 'b)
(adult 1 2 3 4 5)
(juv 10 20 30 40 50)))
(dataframe-display
(dataframe-filter* df (adult) (> adult 3)))
API Overview¶
| Section | Procedures |
|---|---|
| Types | get-type, guess-type, convert-type |
| Series | make-series, make-series*, series?, series-equal?, … |
| Dataframe | make-dataframe, make-df*, dataframe?, dataframe-equal?, … |
| Display | dataframe-display, dataframe-glimpse |
| Read & Write | dataframe-read, csv->dataframe, dataframe-write, … |
| Select, Drop, & Rename | dataframe-select, dataframe-drop, dataframe-rename, … |
| Filter | dataframe-filter, dataframe-partition, dataframe-unique, … |
| Sort | dataframe-sort, dataframe-sort* |
| Split, Bind & Append | dataframe-split, dataframe-bind, dataframe-append, … |
| Crossing | dataframe-crossing |
| Join | dataframe-inner-join, dataframe-left-join, … |
| Reshape | dataframe-stack, dataframe-spread |
| Modify & Aggregate | dataframe-modify, dataframe-aggregate, … |
| Thread Macros | ->, ->> |
| Missing Values | na?, any-na?, remove-na, dataframe-remove-na |
| Statistics | sum, mean, variance, quantile, … |