pola-rs / polars

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

Read Excel Files in Rust using Polars #2088

Open datainvestor opened 2 years ago

datainvestor commented 2 years ago

So I am trying to use Polars and Rust for DataFrames and I think the biggest thing missing is the ability to read excel file and save it as dataframe in Rust. I am talking here about Rust version of Polars not Python where you can use Pandas to read in excel file into dataframe and then convert it to polars.

So I think this feature would be a great thing to add in Polars as this is something that could see a great performance improvement over the Python libraries.

ghuls commented 2 years ago

Fow at least now you will need to implement your own reader. You can try it with: https://docs.rs/calamine/latest/calamine

ghuls commented 2 years ago

You can use QSV to read a sheet of an Excel file to CSV and read that one with polars: https://github.com/jqnatividad/qsv

They use the Calamine crate: https://github.com/jqnatividad/qsv/blob/master/src/cmd/excel.rs#L11

zundertj commented 2 years ago

This has been implemented in #3567 (early June), so closing this issue.

sayyedkamran commented 10 months ago

@zundertj , the issue is about raeding xlsx files in rust, where the referred implementaiton is for python

wangjiawen2013 commented 9 months ago

Reading xlsx in Rust (not python) is prefered because lots of data are pre-existed in excel.

alexander-beedie commented 6 months ago

Reopening, as we are considering adding this feature natively in Rust (though we have no timeline for it yet).

CHRISCARLON commented 1 month ago

Reopening, as we are considering adding this feature natively in Rust (though we have no timeline for it yet).

Hello @alexander-beedie, I was wondering if this feature was still under consideration?

Thanks, Chris

yuribudilov commented 4 weeks ago

Hello everyone. I am new to Polars, intermediate to Rust. As I see (current versions) there is no integrated Rust Polars API available to read Excel files. Is this correct, yes? Is the current suggestion therefore is to use the Rust crate [https://docs.rs/calamine/latest/calamine/index.html#] calamine ? And then use my own custom Rust code to make a Polars DataFrame(s) from whatever shape the calamine returns the Excel data using Rust? Thank you.