Skip to content

[ENH] Add from_dataframe factory method to APIDataset#627

Open
Vaishnav88sk wants to merge 1 commit intogc-os-ai:mainfrom
Vaishnav88sk:feature/api-dataset-from-dataframe
Open

[ENH] Add from_dataframe factory method to APIDataset#627
Vaishnav88sk wants to merge 1 commit intogc-os-ai:mainfrom
Vaishnav88sk:feature/api-dataset-from-dataframe

Conversation

@Vaishnav88sk
Copy link
Copy Markdown

Reference Issues/PRs

Fixes #621

What does this implement/fix? Explain your changes.

Added a from_dataframe class method to APIDataset to allow users to create interaction datasets directly from pandas DataFrames.

  • Simplifies workflow for users with CSV or tabular experimental data.
  • Handles column mapping to internal numpy/torch structures.

What should a reviewer concentrate their feedback on?

  • Method signature and usability for bioinformatics pipelines.

Did you add any tests for the change?

Yes, created pyaptamer/datasets/tests/test_api_dataset.py with tests for basic initialization and the new factory method.

Any other comments?

N/A

PR checklist

  • The PR title starts with [ENH]
  • Added/modified tests
  • Used pre-commit hooks

Implemented a class method from_dataframe() in APIDataset to facilitate
dataset creation directly from pandas DataFrames. This is highly useful
as many users store interaction data in tabular formats.

Features:
- Convenience method for pandas integration
- Automatic extraction of columns to numpy arrays
- Included comprehensive test suite for APIDataset
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.

[ENH] Add from_dataframe factory method to APIDataset

1 participant