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

Reduce import overhead to improve runtime #1821

Merged
merged 4 commits into from
Sep 30, 2024
Merged

Reduce import overhead to improve runtime #1821

merged 4 commits into from
Sep 30, 2024

Conversation

cosmicBboy
Copy link
Collaborator

@cosmicBboy cosmicBboy commented Sep 25, 2024

This PR optmizes the import runtime by lazily importing alternative dataframe libraries that are supported by the pandas backend, e.g. dask, modin, and pyspark.

@cosmicBboy
Copy link
Collaborator Author

@bluenote10 you might be happy to know that I managed to get import and validation time of pandas to below 0.5 seconds (for pandas, at least). Pandera no longer does unnecessary imports of additional libraries (e.g. dask, modin, pyspark, etc) unless you're actually validating a dataframe of that type.

@cosmicBboy cosmicBboy merged commit 4f8bdbf into main Sep 30, 2024
144 checks passed
@cosmicBboy cosmicBboy deleted the speed-up-import branch September 30, 2024 23:17
@bluenote10
Copy link

@cosmicBboy Sounds great, thanks for optimizing this further!

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