Skip to content

Conversation

@alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Nov 8, 2025

Closes #25143.

TLDR: as we already allow bare .item() calls on a (1,1) DataFrame, we should also allow bare .row() calls on a (1,n) DataFrame.

This ensures we have consistent/equivalent behaviour between the item() and row() methods, eg: allow the call without param values if there is only one possible valid option.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Nov 8, 2025
…nt to `.item()` on a single-element DataFrame
@codecov
Copy link

codecov bot commented Nov 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.77%. Comparing base (a3474bb) to head (916e156).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #25229   +/-   ##
=======================================
  Coverage   81.77%   81.77%           
=======================================
  Files        1713     1713           
  Lines      236780   236785    +5     
  Branches     3013     3015    +2     
=======================================
+ Hits       193629   193634    +5     
+ Misses      42381    42380    -1     
- Partials      770      771    +1     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or an improvement of an existing feature python Related to Python Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataFrame.row() without any input to row should be allowed if there is only one row

1 participant