Skip to content

Conversation

@AvinashYerra
Copy link
Contributor

@AvinashYerra AvinashYerra commented Jan 15, 2026

This PR fixes the #1417 to remove the deprecated pandas CSV reader args. Fixed by adding a variable for identifying the pandas version and updated the functions to add them into kwargs only the version is less than 2.0

Changes

  • Updated usage of deprecated pandas CSV parameters:
    • keep_date_col
    • verbose
    • delim_whitespace
  • Ensures compatibility with newer pandas versions (≥ 2.x).
  • Eliminates deprecation warnings observed.

How I tested this

  • Ran the test suite with pytest

Checklist

  • [Y] PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

@AvinashYerra
Copy link
Contributor Author

@skrawcz , can you please review this and let me know if any changes are required

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.

In the right direction. Some changes please.

kwargs["storage_options"] = self.storage_options
if pd.__version__ >= "2.0" and self.dtype_backend is not None:
kwargs["dtype_backend"] = self.dtype_backend
if pandas_version < Version("2.0"):
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to import Version at the top of the file -- then tests should pass...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can you check now @skrawcz

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 for the changes -- just need to get CI to pass now.

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.

2 participants