Issue
I am a python pandas user but recently found about polars dataframe and it seems quite promising and blazingly fast. I am not able to find a way to open an excel file in polars. Polars is happily reading csv
, json
, etc. but not excel.
I am extensive user of excel files in pandas and I want to try using polars. I have many sheets in excel that pandas automatically read. How can I do same with polars?
What am I missing?
Solution
This is more of a workaround than a real answer, but you can read it into pandas and then convert it to a polars dataframe.
import polars as pl
import pandas as pd
df = pd.read_excel(...)
df_pl = pl.DataFrame(df)
You could, however, make a feature request to the Apache Arrow community to support excel files.
Answered By - Moriarty Snarly
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.