Skip to content

Add support for dataframe and arrow table in add_entities#907

Merged
mdekstrand merged 6 commits intolenskit:mainfrom
FroggoLight:issue843
Mar 28, 2026
Merged

Add support for dataframe and arrow table in add_entities#907
mdekstrand merged 6 commits intolenskit:mainfrom
FroggoLight:issue843

Conversation

@FroggoLight
Copy link
Copy Markdown
Contributor

Allows client to call add_entities with either dataframe or arrow table without having to call individual add_attributes for all of the data columns.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 26, 2025

Codecov Report

❌ Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.69%. Comparing base (a06c741) to head (4eb1dce).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/lenskit/data/builder.py 91.30% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #907   +/-   ##
=======================================
  Coverage   89.69%   89.69%           
=======================================
  Files         223      223           
  Lines       15476    15499   +23     
=======================================
+ Hits        13881    13902   +21     
- Misses       1595     1597    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@mdekstrand mdekstrand left a comment

Choose a reason for hiding this comment

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

Good work! There are some subtle edge cases for different Pandas index layouts we need to handle, and documentation to add, but otherwise it looks sound.

Comment thread tests/data/test_builder_entities.py
Comment thread tests/data/test_builder_entities.py
Comment thread src/lenskit/data/builder.py Outdated
Comment thread src/lenskit/data/builder.py Outdated
Comment thread src/lenskit/data/builder.py
@mdekstrand mdekstrand linked an issue Oct 28, 2025 that may be closed by this pull request
@mdekstrand mdekstrand added this to the 2026.1 milestone Mar 27, 2026
@mdekstrand mdekstrand added the data Data management support. label Mar 27, 2026
@mdekstrand mdekstrand merged commit ff7138d into lenskit:main Mar 28, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Data management support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for attributes to add_entities

2 participants