Skip to content

Error raised message: DataFrame eval will not work with 'Timestamp' column name #47273

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 38 commits into from
Aug 12, 2022

Conversation

weikhor
Copy link
Contributor

@weikhor weikhor commented Jun 7, 2022

@weikhor weikhor changed the title Test eval message Error raised message: DataFrame eval will not work with 'Timestamp' column name Jun 7, 2022
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

https://github.com/pandas-dev/pandas/blob/main/pandas/core/computation/scope.py#L56

we explicitly set this. as an injected global. i am not sure what you could do there but i agree with @phofl that we would like to allow this

@weikhor weikhor requested review from jreback and phofl June 11, 2022 11:34
@mroeschke mroeschke added the expressions pd.eval, query label Jul 22, 2022
def test_eval_no_support_column_name(request, column):
# GH#44603
if column in ["True", "False", "inf", "Inf"]:
request.node.add_marker(pytest.mark.xfail(raises=KeyError))
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a reason here (with a f-string with the column value)?

@mroeschke mroeschke added this to the 1.5 milestone Aug 1, 2022
Copy link
Contributor

@jreback jreback left a 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 whatsnew entry (for 1.5, conversion bug fix section)

@weikhor
Copy link
Contributor Author

weikhor commented Aug 4, 2022

can you add a whatsnew entry (for 1.5, conversion bug fix section)

Have added a whatsnew entry (for 1.5, conversion bug fix section)

@weikhor weikhor closed this Aug 4, 2022
@weikhor weikhor reopened this Aug 4, 2022
@weikhor weikhor requested a review from jreback August 4, 2022 16:54
@weikhor weikhor requested a review from mroeschke August 10, 2022 14:30
@jreback jreback merged commit 8b36142 into pandas-dev:main Aug 12, 2022
@jreback
Copy link
Contributor

jreback commented Aug 12, 2022

thanks @weikhor this is great!

@weikhor weikhor deleted the test_eval_message branch August 12, 2022 01:02
YYYasin19 pushed a commit to YYYasin19/pandas that referenced this pull request Aug 23, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expressions pd.eval, query
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: DataFrame eval will not work with 'Timestamp' column name
4 participants