Skip to content

Conversation

@iprithv
Copy link

@iprithv iprithv commented Nov 13, 2025

fix: remove deprecated pandas CSV reader args (keep_date_col, verbose, delim_whitespace)
fixes #1417

These pandas arguments are deprecated and generate warnings during the test suite.
This PR removes them from Hamilton’s PandasCSVReader to maintain future compatibility and keep test output clean.

Changes

  • Removed usage of deprecated pandas CSV parameters:
    • keep_date_col
    • verbose
    • delim_whitespace
  • Updated _get_loading_kwargs() to avoid passing these keywords.
  • Ensures compatibility with newer pandas versions (≥ 2.x).
  • Eliminates deprecation warnings observed.

How I tested this

  • Ran the test suite with pytest
  • Confirmed that CSV-related tests pass without warnings

Notes

Checklist

  • PR has an informative, human-readable title
  • Changes limited to a single goal
  • Code passes pre-commit and removes old warnings
  • No functional behaviour change; only param cleanup
  • Any updated helper logic covered by existing tests
  • No leftover TODOs or placeholder code
  • Documentation not required (internal cleanup)

Copy link
Contributor

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

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

Thanks @iprithv.

Sorry it took so long to review.

Great start. One concern, we need to make this backwards compatible. We currently don't have a minimum pandas version.

So please:

  1. Make this check the pandas version to selectively exclude things.
  2. Add comments in the "constructor" for these values that they are not used if pandas is greater than X.

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.

Deprecation warnings in Pandas CSV Reader

2 participants