-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Raise ParserError instead of IndexError when specifying an incorrect number of columns with index_col for the read_csv C parser. #48774
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
Conversation
…number of columns with index_col for the read_csv C parser.
doc/source/whatsnew/v1.6.0.rst
Outdated
@@ -35,7 +35,7 @@ Other enhancements | |||
- Added ``index`` parameter to :meth:`DataFrame.to_dict` (:issue:`46398`) | |||
- Added metadata propagation for binary operators on :class:`DataFrame` (:issue:`28283`) | |||
- :class:`.CategoricalConversionWarning`, :class:`.InvalidComparison`, :class:`.InvalidVersion`, :class:`.LossySetitemError`, and :class:`.NoBufferPresent` are now exposed in ``pandas.errors`` (:issue:`27656`) | |||
- | |||
- :func:`read_csv`: specifying an incorrect number of columns with ``index_col`` of now raises ``ParserError`` instead of ``IndexError`` when using the c parser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you put this under Other API changes
? While this is an improvement, this is technically changing the exception class (albeit for the better)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done
Thanks @DriesSchaumont |
…rect number of columns with index_col for the read_csv C parser. (pandas-dev#48774) * Raise ParserError instead of IndexError when specifying an incorrect number of columns with index_col for the read_csv C parser. * Move whatsnew entry * Cleanup after moving whatsnew * Cleanup after moving whatsnew (pt. 2)
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.