Skip to content

[ENH]: fix adorn functions to preserve numeric values in first column (#1676) - #1696

Open
SumanGouda wants to merge 4 commits into
pyjanitor-devs:devfrom
SumanGouda:fix/adorn-numeric-first-column
Open

[ENH]: fix adorn functions to preserve numeric values in first column (#1676)#1696
SumanGouda wants to merge 4 commits into
pyjanitor-devs:devfrom
SumanGouda:fix/adorn-numeric-first-column

Conversation

@SumanGouda

Copy link
Copy Markdown

[ENH]: fix adorn functions to preserve numeric values in first column

PR Description

Please describe the changes proposed in the pull request:

  • Updated adorn_pct_formatting, adorn_ns, and adorn_rounding to exclude the first column (index 0) from numeric column processing so non-category identifiers (e.g., cyl) remain untouched.
  • Ensured string assignment in adorn_ns safely handles data column types by casting targeted columns to object.
  • Added unit test test_adorn_functions_preserve_numeric_first_column in tests/functions/test_tabyl.py to verify behavior with numeric first columns.

This PR resolves #1676.

PR Checklist

Please ensure that you have done the following:

  1. PR in from a fork off your branch. Do not PR from sumangouda:dev, but rather from sumangouda:fix/adorn-numeric-first-column.
  2. Add a line to CHANGELOG.md under the latest version header (i.e. the one that is "on deck") describing the contribution.

Automatic checks

There will be automatic checks run on the PR. These include:

  • Building a preview of the docs on Netlify
  • Automatically linting the code
  • Making sure the code is documented
  • Making sure that all tests are passed
  • Making sure that code coverage doesn't go down.

Relevant Reviewers

Please tag maintainers to review.

@SumanGouda SumanGouda changed the title Fix/adorn numeric first column [ENH]: fix adorn functions to preserve numeric values in first column (#1676) Aug 26, 2026
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.98%. Comparing base (901f4b3) to head (c00cf7a).
⚠️ Report is 218 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1696      +/-   ##
==========================================
- Coverage   87.56%   85.98%   -1.58%     
==========================================
  Files          95      125      +30     
  Lines        6819     9962    +3143     
==========================================
+ Hits         5971     8566    +2595     
- Misses        848     1396     +548     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SumanGouda
SumanGouda force-pushed the fix/adorn-numeric-first-column branch from 63cf8c8 to c00cf7a Compare August 26, 2026 18:03
@SumanGouda

Copy link
Copy Markdown
Author

The doc build failed with a 403 permission error on github-actions[bot] deploying to gh-pages (PR preview deployment from fork).

@samukweku
samukweku requested a review from ericmjl August 27, 2026 21:12
@samukweku

Copy link
Copy Markdown
Collaborator

@ericmjl may i get your review on this

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.

[BUG] adorn_pct_formatting, adorn_ns and adorn_rounding overwrite a numeric first column

2 participants