Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save librasteve/c733fb6c9ad761f02545c4ff0b1fda32 to your computer and use it in GitHub Desktop.
Save librasteve/c733fb6c9ad761f02545c4ff0b1fda32 to your computer and use it in GitHub Desktop.
raku Dan::Polars read_csv, to-dataset example
#!/usr/bin/env raku
use lib '../lib';
use Dan;
use Dan::Polars;
my \df = DataFrame.new;
df.read_csv("../dan/src/iris.csv");
df.head;
my \ds = df.to-dataset;
say ds[3;3];
# to try this at home
# docker run -it p6steve/raku-dan:polars-2022.02-arm64 #(or -amd64)
# zef install Dan;
# git clone https://github.com/p6steve/raku-Dan-Polars.git
# cd raku-Dan-Polars
# cd dan
# cargo build
# cd ../bin
# ./synopsis-dan-polars4.raku #(or 1,2,3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment