altair icon indicating copy to clipboard operation
altair copied to clipboard

wip-feat: pandas as soft dependency

Open mattijn opened this issue 1 year ago • 11 comments

This PR is an attempt to make pandas a soft dependency. I hope it can be used as inspiration, as I was not able to make the types happy. I've no real idea how it should be done, but I've been trying a few things, some with success and others without.

I also made an attempt to prioritize the DataFrameLike approach over the pandas routine, but decided to not do this as otherwise usage of a pandas DataFrame within Altair will require pyarrow to infer/serialize. My current feeling is that usage of pandas to infer and serialize the data is still preferred as it is not yet depending on pyarrow.

mattijn avatar Mar 25 '24 23:03 mattijn

Great to get the ball rolling on this, thank you @mattijn! I did not yet have time to review but just wanted to say that I'm happy to have a look at the types once I get to it. As long as the package works, I'm optimistic that we can make mypy happy.

binste avatar Mar 29 '24 06:03 binste

Thanks @binste! No rush! Maybe something for version 5.4

mattijn avatar Mar 29 '24 07:03 mattijn