Skip to content

Conversation

Dr-Irv
Copy link
Contributor

@Dr-Irv Dr-Irv commented Feb 4, 2022

pylance 2022.2.0

The following code:

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)

reports

Argument of type "Series[S1@__getitem__]" cannot be assigned to parameter "left" of type "DataFrame" in function "merge"
  "Series[S1@__getitem__]" is incompatible with "DataFrame"

This PR fixes that issue. Note it was previously fixed in #61 and then broken in #129 .

@gramster gramster merged commit 8266baf into microsoft:main Feb 7, 2022
@Dr-Irv Dr-Irv deleted the mergefix branch February 18, 2022 19:59
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.

2 participants