Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should pandas be an optional dependency? #261

Closed
nathanjmcdougall opened this issue Jul 20, 2024 · 2 comments
Closed

Should pandas be an optional dependency? #261

nathanjmcdougall opened this issue Jul 20, 2024 · 2 comments

Comments

@nathanjmcdougall
Copy link
Contributor

nathanjmcdougall commented Jul 20, 2024

This is very similar to the discussion in #233 about making pins DF-library agnostic.

I'm in two minds about this.

On the one hand, the vast majority of the time, anyone who wants to use pins will be using pandas.
On the other hand, that means they would already have it installed, making it unlikely that pandas being optional would cause major friction.

Making it optional would enable polars users etc. to use pins without needing to install pandas (see #153).

It is being considered to add pyarrow as a required dependency to pandas which would increase the installation size by ~120MB.
pandas-dev/pandas#54466

The costs to this project would be additional code complexity to protect import statements with try-except, as well as potentially some internal refactoring (e.g. as_df options).

@isabelizimm
Copy link
Collaborator

isabelizimm commented Jul 22, 2024

For pins in the short/medium-term future, I would be more keen to have pandas built-in and expand the ability to use polars/any other dataframe library as desired. I do believe pins should have at least one reasonable library included so users can read data, perhaps pinned by a colleague or from R, as a data frame without having to make a decision on what type of df that is/seeing errors if there is no dataframe library installed.

I could see a world where the default library is polars instead of pandas, but I do think pandas still has the masses for now.

@nathanjmcdougall
Copy link
Contributor Author

Sounds good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants