-
Notifications
You must be signed in to change notification settings - Fork 103
Closed
Description
Despite not being documented, the following works:
import pandas as pd
df1 = pd.DataFrame([["a", 1], ["b", 2]], columns=["let", "num"]).set_index("let")
s2 = df1["num"]
res = pd.merge(s2, df1, left_index=True, right_index=True)
print(res)pylance 2021.5.3 reports
Argument of type "Series[Dtype@__getitem__]" cannot be assigned to parameter "left" of type "DataFrame" in function "merge"
"Series[Dtype@__getitem__]" is incompatible with "DataFrame"
Basically, a Series can be the first argument to the various pd.merge() functions.
PR to follow. Will also do a pandas PR to fix the docs
Metadata
Metadata
Assignees
Labels
No labels