POLARS has fixed my "INDEX" error instead of PANDAS

Hello everyone,

I just want to share an experience.

I work on a streamlit project since 3 months for a multinational. I have to compare benefiits between Streamlit and Power BI. That was a bracket :cowboy_hat_face:

In my script, i get this error “index 22656 is out of bounds for axis 0 with size 22656”. In fact, I have a dataframe of 22656 rows and i need to introduce it in a PYGWALKER API. When i only want to display my data with “st.dataframe”, no error, but when i replace “st.dataframe” by “pyg.walk(…)”, i get this error. I don’t find problems in my indexs too.

So, i tried to fix this issues and there i discover POLARS. I tried to change only the format of my dataframe. I convert from PANDAS to POLARS. It’s always a dataframe, but i changed constructor. And what happens ? My error no longer exists. :partying_face:

I decide to share this alternative whether someone gets this issue and take opportunity to notice existence of POLARS that i discover. It seems that it is faster than PANDAS, from some researchs on web.

Enjoy :nerd_face:

Hi @Jojo

I found a similar issue in github of pygwalker: [BUG] Index out of bounds on reading a dataframe · Issue #516 · Kanaries/pygwalker · GitHub

This is a problem caused by duckdb(0.10.0), which version of duckdb are you using?

1 Like

Hello @longxiaofei ,
Thanks for you response.
Indeed, my version of DuckDB is v0.10.0. I’m going to try something knowing information you gave me.

Thanks a lot.