-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: parase_dates column is in dataframe (#31251) #31550
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
|
||
def test_missing_column(all_parsers): | ||
parser = all_parsers | ||
content = StringIO("time,val\n" "212.23, 32\n") |
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.
I believe that the CI will fail because, this string is not concatenated, can ou please concatenate them?
|
||
|
||
def test_missing_column(all_parsers): | ||
parser = all_parsers |
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.
Can you add the github issue number as a comment here?
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.
Can you add a what’s new message for v1.1?
pandas/io/parsers.py
Outdated
@@ -3278,6 +3278,8 @@ def _isindex(colspec): | |||
if is_scalar(colspec): | |||
if isinstance(colspec, int) and colspec not in data_dict: | |||
colspec = orig_names[colspec] | |||
elif colspec not in orig_names: | |||
raise ValueError(f"'{colspec}' is not in list") |
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.
raise ValueError(f"'{colspec}' is not in list") | |
raise ValueError(f"Missing column provided to ‘parse_dates’: '{colspec}'") |
Not tied to the wording but I don’t think “is not in list” is super clear to the end user, so could improve a bit
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.
I had missed to check CParser, handled it now.
…ers (pandas-dev#31380) * BUG: Timedelta components no longer rounded with high precision integers * Simplify NaT.total_seconds * Also simplify another tz conversion code path
Remove unrequired channel
@gfyoung wrote this function here pandas-dev#30999 (comment) so we can ignore error messages without breaking fututre CI tests of bare pytest raises calls Co-authored-by: gfyoung <[email protected]> xref pandas-devgh-30999
* REF: Move Loc-only methods to Loc * rebase fixup * merge fixup
I had made a mistake on trying to resolve conflict. will have to open a new PR. |
My way around this kind of thing is:
But it's not a good practice because you'll need to force-push it
|
@MomIsBestFriend I think I messed up again and got the same problem in #31815. |
@sathyz I reccomend you to read this, which is a blog written by @datapythonista |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff