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

Implement __matmul__, typehint pd.DataFrame.eval inplace and test conversion for test_frame.py #1053

Open
loicdiridollou opened this issue Nov 23, 2024 · 0 comments · May be fixed by #1054
Open

Comments

@loicdiridollou
Copy link
Contributor

Describe the bug

  • @ operator on dataframe is not typehinted properly.
  • df.eval("...", inplace=True) returns Unknown
  • Convert test for types into check/assert_type framework

To Reproduce

import pandas as pd

df1 = pd.DataFrame([[0, 1, -2, -1], [1, 1, 1, 1]])
df2 = pd.DataFrame([[0, 1], [1, 2], [-1, -1], [2, 0]])

check(assert_type(df1 @ df2, pd.DataFrame ),pd.DataFrame )
check(assert_type(df1.eval("c = 0 + 1", inplace=True), None), type(None))

Please complete the following information:

  • OS: [e.g. Windows, Linux, MacOS] MacOS
  • OS Version [e.g. 22] 15
  • python version 3.12
  • version of type checker 1.13
  • version of installed pandas-stubs 2.2.3.20241009
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 a pull request may close this issue.

1 participant