wiseaidev / rust-data-analysis

Rust for data analysis encyclopedia (WIP).
Apache License 2.0
358 stars 38 forks source link

Do I need to install dependencies every time I run the notebook? #41

Closed langslike closed 3 months ago

langslike commented 3 months ago

When I first run 3-polars-tutorial-part-1.ipynb, I already installed every dependencies, and the code runs fine. But when I open the notebook for the second time, it seems that I have to install dependencies again, and its time consuming. when I try to skip the code that install polars: :dep polars = { version = "0.35.0", features = ["describe", "lazy", "ndarray", "object", "dtype-struct", "concat_str", "mode"] } I got error when running this code: use polars::datatypes::DataType; use polars::prelude::*; use chrono::{DateTime, NaiveDateTime, TimeZone, Utc}; use std::sync::Arc; The errors are: [E0433] Error: failed to resolve: use of undeclared crate or module polars [E0433] Error: failed to resolve: use of undeclared crate or module polars

How to use locally installed crates with rust notebook?

wiseaidev commented 3 months ago

Hello!

You can use the :cache command to enable and set the compilation cache. Have a look at the updated tutorial 1.