From the course: Using Rust with Python

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Using Polars in Python with Rust

Using Polars in Python with Rust - Rust Tutorial

From the course: Using Rust with Python

Using Polars in Python with Rust

- [Instructor] Here's an example of how the Rust DataFrame library Polars could be used in a realistic project. First up, we have the Rust project ecosystem, which includes the Cargo package management system, which would install Polars and any other libraries, for example, Clap or Criterion if you needed to do benchmarking. Once you've got all this set up, the next step would be to add some integration tests, add some unit tests, add your benchmarks, put it all together so that you're able to verify the performance, the business logic, as well as the contract for, let's say, the binary tool that you're delivering. So that's kind of the high level overview, but let's go ahead and look at Polars real quick and see at some of the things that you could do. So first up, in terms of the API here, you can see it's very straightforward. In a function, you would build out, let's say, you know, importing a CSV file, processing it, doing some groupby operations, and in terms of the performance,…

Contents