Created
July 11, 2022 17:21
-
-
Save librasteve/c733fb6c9ad761f02545c4ff0b1fda32 to your computer and use it in GitHub Desktop.
raku Dan::Polars read_csv, to-dataset example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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