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 support for polars dataframes #388

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

Conversation

DevangThakkar
Copy link

This PR fixes #376 and support for polars dataframes. Users can now convert a BedTool object to a polars dataframe using the to_polars_dataframe method, and create a BedTool object from a polars dataframe using the from_polars_dataframe method. The functions follow the style of the to_dataframe and from_dataframe functions with required modifications for polars syntax.

I have also added docs for the functionality to export to/import from pandas/polars dataframes. I have not worked with reStructuredText before so it might have some visual glitches.

I have also added some tests for both functions in the test_from_polars_dataframe function in test_1.py.

Let me know what you think!

@DevangThakkar
Copy link
Author

Hi @daler , please let me know if you have any thoughts on this - I think it would be useful to have this functionality for pybedtools. Happy to make changes as needed. :)

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.

Support for Polars Dataframe needed
1 participant