Easiest way to get a pandas dataframe from python to rust?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ZenithTA

    A high performance python technical analysis library written in Rust and the Numpy C API.

    I have a technical analysis library written for Python using Rust and PyO3 called ZenithTA. A typical Dataframe for a stock has four columns: open, high, low, and close. Currently, I am converting each of the rows into lists to pass into Rust. It would be way easier if the end user could just pass in the dataframe, and I could just manipulate it in Rust. Does anyone have any tips or advice for doing this?

  • polars

    Dataframes powered by a multithreaded, vectorized query engine, written in Rust

    Yeah. Once it's in arrow format you can pass things around pretty easily, such as in this polars ffi example: https://github.com/pola-rs/polars/tree/master/examples/python_rust_compiled_function

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • pyo3-polars

    Pyo3 extensions for polars

    If you use polars, you can go between rust and python for free within the same process. I have made pyo3 extensions to make this easier: https://github.com/pola-rs/pyo3-polars

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts