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

Add polars basic support #485

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sanurielf
Copy link

This PR is to include to_polars function to export data in polars DataFrame format. Basic unittest included also.

@sanurielf sanurielf requested a review from hiohiohio as a code owner July 6, 2024 23:50
@sanurielf
Copy link
Author

Hey @hiohiohio this is to add polars support, we currently use polars but the pandas to polars conversion is CPU intensive for large data.

@hiohiohio
Copy link
Contributor

hiohiohio commented Jul 11, 2024

@sanurielf thank you for the PR. Regarding polars and/or design of alpaca-py, wondering points in the below. sorry still lacking confidence to say.
a. should we set polars and pandas as optional dependency? i.e. installing with alpaca-py[pandas], alpaca-py[polars]. or we are ok to set pandas/polars as dependencies since usually both are already installed for data related work?
b. should we introduce pandas/polars interface into client instead of response model to skip computation of json to pydantic layer? or should we separate raw data client and pydantic/pandas/polars wrapping clients? (keeping pydantic for request model validation)

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

Successfully merging this pull request may close these issues.

2 participants