pola-rs / polars

Dataframes powered by a multithreaded, vectorized query engine, written in Rust
https://docs.pola.rs
Other
29.83k stars 1.92k forks source link

Where does `docs/data/iris.csv` live? #17452

Open liufeimath opened 3 months ago

liufeimath commented 3 months ago

Description

I see the iris.csv path in e.g. this web doc. But when I run df = pl.read_csv("docs/data/iris.csv"), python says FileNotFoundError: No such file or directory (os error 2): docs/data/iris.csv

Does it mean that I need to clone the github repo to make the docs path work, or am I installing polars wrong? I just did pip install polars, nothing more.

Link

https://docs.pola.rs/user-guide/concepts/lazy-vs-eager/

cmdlineluser commented 3 months ago

Perhaps the code should be updated to use the full url?

df = pl.read_csv("https://github.com/pola-rs/polars/raw/main/docs/data/iris.csv")

You can also save the file locally:

liufeimath commented 3 months ago

Got it. Then yes I think it's better to use the full path so that the user guide code example can be directly runnable. Thanks!