great-tables
great-tables copied to clipboard
feat: implement `cols_reorder()` for flexible column reordering
Hello team,
This PR introduces cols_reorder(), allowing users to reorder columns in a specified order easily.
While the existing move_*() functions are useful for repositioning a few columns, they don't provide fine-grained control over column order. I've often had to rely on Pandas or Polars for this task. The implementation of this function follows a straightforward approach, similar to the existing move_*() functions.
Feedback is always welcome!😊
Codecov Report
Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
Project coverage is 90.86%. Comparing base (
dc82197) to head (60d43ce). Report is 1 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| great_tables/_spanners.py | 87.50% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #625 +/- ##
==========================================
+ Coverage 90.85% 90.86% +0.01%
==========================================
Files 46 46
Lines 5423 5432 +9
==========================================
+ Hits 4927 4936 +9
Misses 496 496
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.