You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpandasaspddf=pd.DataFrame({1: [2], 3: [4]}) # Fix is heredf=df.drop(columns={1})
Secondly, the pandas documentation says that the argument for columns is "single label or list-like". While your code works, it is not clear that it should. The stubs follows what is documented and a set is not "list-like".
I've added a reference to a pandas issue pandas-dev/pandas#59890 to see what the pandas developers say there.
Describe the bug
DataFrame.drop
withcolumns=set(...)
is unspecified.To Reproduce
pandas
example that is not properly checked by the stubs.mypy
type checker.Please complete the following information
[System.Environment]::OSVersion.Version
Python 3.11.9
mypy 1.11.2 (compiled: yes)
pandas-stubs
:pandas-stubs==2.2.2.240807
Additional context
Nope
The text was updated successfully, but these errors were encountered: