acidplyr.right_join¶
- acidplyr.right_join(x: DataFrame, y: DataFrame, by: str | list[str]) DataFrame¶
Right join: equivalent to left_join(y, x, by).
- Parameters:
- Returns:
All rows from
y, with matching columns fromxwhere available (NaNotherwise).- Return type:
pd.DataFrame
Examples
>>> import pandas as pd >>> x = pd.DataFrame( ... { ... "name": ["Mick", "John", "Paul"], ... "band": ["Stones", "Beatles", "Beatles"], ... } ... ) >>> y = pd.DataFrame({"name": ["John", "Paul", "Keith"]}) >>> right_join(x, y, by="name")["name"].tolist() ['John', 'Paul', 'Keith']