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

feat: Initial support for Pandas timeseries backend. #240

Merged
merged 7 commits into from
Oct 9, 2024

Conversation

jetuk
Copy link
Member

@jetuk jetuk commented Aug 7, 2024

Basic support for loading dataframes using Pandas. This is implemented using a Python callback function that loads the dataframe using Pandas, and then converts it to Polars.

Basic support for loading dataframes using Pandas. This is
implemented using a Python callback function that loads the
dataframe using Pandas, and then converts it to Polars.
@jetuk jetuk requested a review from Batch21 August 7, 2024 11:05
Copy link
Contributor

@Batch21 Batch21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good though to get it to work with my venv I had to add the path to the site-packages folder as suggested here - PyO3/pyo3#3726 It looks like pyo3 doesn't yet have great support for virtual environments.


let mut df = df.0;

println!("Loaded Pandas dataset: {}", df);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove print statement?

@jetuk
Copy link
Member Author

jetuk commented Aug 15, 2024

This worked fine for me when running the tests with my virtual environment activated. However, I appreciate that may not be working for everyone. The CI has the same issue with the Rust workflows not having the correct Python libraries available.

If this is to go ahead we might need to merge the workflows or only run some of the tests in the Python workflows.

One general option is to add a "python" feature to the schema crate that would include things like this Pandas support.

@jetuk
Copy link
Member Author

jetuk commented Sep 4, 2024

What do you think is the best way forward with this?

jetuk added 2 commits October 7, 2024 13:31
This is used to gate tests which need Python env available
while running the Rust tests.
Also some tweaks to the Pandas implementation.
@jetuk
Copy link
Member Author

jetuk commented Oct 7, 2024

I've featured gated the Rust tests that need a Python environment to work. They are not currently run in the CI.

@jetuk jetuk requested a review from Batch21 October 7, 2024 14:41
@jetuk jetuk merged commit 4dca438 into main Oct 9, 2024
7 checks passed
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