Skip to content
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

GH1053 @ for DataFrame, eval in place for DataFrame, test migrations #1054

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

loicdiridollou
Copy link
Contributor

Comment on lines 628 to 631
@overload
def eval(self, expr: _str, *, inplace: Literal[False] = ..., **kwargs): ...
@overload
def eval(self, expr: _str, *, inplace: Literal[True] = ..., **kwargs) -> None: ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

swap these 2 overloads, and with inplace: Literal[True], remove the ellipses.

And for Literal[False] = ..., we should return Scalar | np.ndarray | pd.DataFrame | pd.Series

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was not totally sure about the returns of the case for False but thanks for adding the details, it is implemented.
For the first point about the order, do you mind clarifying how it changes the results to have them swapped?

tests/test_frame.py Show resolved Hide resolved
tests/test_frame.py Outdated Show resolved Hide resolved
tests/test_frame.py Outdated Show resolved Hide resolved
tests/test_frame.py Show resolved Hide resolved
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.

Implement __matmul__, typehint pd.DataFrame.eval inplace and test conversion for test_frame.py
2 participants