Skip to content

[INF] Enforce dependency on pandas 3.0.0#1601

Open
raffaelemancuso wants to merge 1 commit into
pyjanitor-devs:devfrom
raffaelemancuso:patch-1
Open

[INF] Enforce dependency on pandas 3.0.0#1601
raffaelemancuso wants to merge 1 commit into
pyjanitor-devs:devfrom
raffaelemancuso:patch-1

Conversation

@raffaelemancuso
Copy link
Copy Markdown

@raffaelemancuso raffaelemancuso commented Apr 10, 2026

PR Description

Please describe the changes proposed in the pull request:

  • Nowadays, pyjanitor depends on pandas >= 3.0.0 and won't work with pandas < 2.0

This PR resolves #1597 .

PR Checklist

Please ensure that you have done the following:

  1. PR in from a fork off your branch. Do not PR from <your_username>:dev, but rather from <your_username>:<feature-branch_name>.
  1. If you're not on the contributors list, add yourself to AUTHORS.md.
  1. Add a line to CHANGELOG.md under the latest version header (i.e. the one that is "on deck") describing the contribution.
    • Do use some discretion here; if there are multiple PRs that are related, keep them in a single line.

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.

@raffaelemancuso raffaelemancuso changed the title Enforce dependency on pandas 3.0.0 [INF] Enforce dependency on pandas 3.0.0 Apr 10, 2026
Copy link
Copy Markdown
Member

@ericmjl ericmjl left a comment

Choose a reason for hiding this comment

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

Thank you, @raffaelemancuso! I'm approving. @samukweku can I check if this will have any negative impact? I think it's time we pin to a newer version of pandas.

@ericmjl
Copy link
Copy Markdown
Member

ericmjl commented Apr 11, 2026

Hi @raffaelemancuso! The CI is failing because the pixi.lock file needs to be regenerated after the dependency change in pyproject.toml.

To fix, please run:

pixi lock
git add pixi.lock
git commit -m "[INF] Update pixi.lock for pandas>=3.0.0 dependency"
git push

This will update the lock file to reflect the new pandas>=3.0.0 dependency.

@raffaelemancuso
Copy link
Copy Markdown
Author

I have updated Python to >= 3.11 because pandas >= 3.0 depends on Python >= 3.11

uv run pixi lock
Using CPython 3.14.2
Creating virtual environment at: .venv
  × No solution found when resolving dependencies for split (markers: python_full_version >= '3.8' and
  │ python_full_version < '3.11'):
  ╰─▶ Because the requested Python version (>=3.8) does not satisfy Python>=3.11 and pandas>=3.0.0 depends on
      Python>=3.11, we can conclude that pandas>=3.0.0 cannot be used.
      And because only the following versions of pandas are available:
          pandas<=3.0.0
          pandas==3.0.1
          pandas==3.0.2
      we can conclude that pandas>=3.0.0 cannot be used.
      And because your project depends on pandas>=3.0.0 and your project requires pyjanitor[all], we can conclude that
      your project's requirements are unsatisfiable.

      hint: While the active Python version is 3.14, the resolution failed for other Python versions supported by your
      project. Consider limiting your project's supported Python versions using `requires-python`.

      hint: The `requires-python` value (>=3.8) includes Python versions that are not supported by your dependencies
      (e.g., pandas>=3.0.0 only supports >=3.11). Consider using a more restrictive `requires-python` value (like
      >=3.11).

@raffaelemancuso
Copy link
Copy Markdown
Author

Hi @raffaelemancuso! The CI is failing because the pixi.lock file needs to be regenerated after the dependency change in pyproject.toml.

To fix, please run:

pixi lock
git add pixi.lock
git commit -m "[INF] Update pixi.lock for pandas>=3.0.0 dependency"
git push

This will update the lock file to reflect the new pandas>=3.0.0 dependency.

Done

Is there a particular reason why we use pixi instead of uv?

It feels much clunkier (even to install it), and I believe the vast majority of projects is using uv

@ericmjl
Copy link
Copy Markdown
Member

ericmjl commented Apr 12, 2026

It's an early decision I made when I was getting familiar with pixi. Always happy to retool later. I'm paying close attention to the state of uv, given that the team was acquihired by OpenAI, so I'm not really sure what will happen of it.

Nonetheless, thank you for handling this!

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1601      +/-   ##
==========================================
- Coverage   87.56%   85.88%   -1.68%     
==========================================
  Files          95      125      +30     
  Lines        6819     9892    +3073     
==========================================
+ Hits         5971     8496    +2525     
- Misses        848     1396     +548     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Bump requires-python to >=3.11 and pin pandas>=3.0.0 in project
dependencies. Regenerate pixi.lock and remove redundant pixi pandas pin.

Fixes pyjanitor-devs#1597

Co-authored-by: Cursor <cursoragent@cursor.com>
@ericmjl
Copy link
Copy Markdown
Member

ericmjl commented May 30, 2026

@raffaelemancuso, thanks for this! The CI failures are both infra-related, not code issues:

  • Docs build fails because the GITHUB_TOKEN from forks doesn't have write access to gh-pages (known limitation).
  • Codecov shows a coverage drop, but it's comparing against a stale base (185 commits behind dev).

All three test matrices (py311/312/313) pass cleanly. The change is straightforward -- just tightening the pandas constraint to match reality. I've already rebased onto dev and it was clean (already up to date).

@samukweku, wdyt? Shall we merge this one?

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.

Enforce pandas dependency

2 participants