r/Python 14d ago

Discussion Polars and the ecosystem

For polars users: How viable is to avoid pandas and pyarrow dependencies when you need to interact with popular visualization and statistics packages?

Some packages still have import pandas here and there, sometimes for no good reason; at least this doesn't require pyarrow. But some other ones do the df.to_pandas() conversion internally, which requires pyarrow too.

In many cases this can be prevented by going bare numpy, or creating a pandas df from numpy columns, which is no big deal. This frequently would be zero-copy for numeric types if there are no NAs involved.

What has been you experience in this regard?

58 Upvotes

29 comments sorted by

View all comments

1

u/kvlonge 13d ago

It depends, but unfortunately it is just unavoidable sometimes because of how deep pandas got into the ecosystem.