Skip to content

BUG: read_csv(on_bad_lines='warn') did not raise a Python warning #55071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Sep 8, 2023

@mroeschke mroeschke added IO CSV read_csv, to_csv Warnings Warnings that appear or should be added to pandas labels Sep 8, 2023
@mroeschke mroeschke requested a review from WillAyd as a code owner September 8, 2023 17:57
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

looks reasonable. wonder why this wasn't done this way in the first place? maybe a compat thing?

@mroeschke mroeschke added this to the 2.2 milestone Sep 8, 2023
@mroeschke
Copy link
Member Author

Yeah maybe it was added to the python engine for compat. Not sure why the c engine wrote to stderr

@mroeschke mroeschke merged commit 5cf6e74 into pandas-dev:main Sep 8, 2023
@mroeschke mroeschke deleted the bug/csv/warn branch September 8, 2023 20:32
@amithkk amithkk mentioned this pull request Sep 8, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv Warnings Warnings that appear or should be added to pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: read_csv(on_bad_lines="warn") should raise a UserWarning instead of writing to stderr
2 participants