acidplyr.full_join

acidplyr.full_join(x: DataFrame, y: DataFrame, by: str | list[str]) DataFrame

Full (outer) join: return all rows from both x and y.

Parameters:
  • x (pd.DataFrame) – Left DataFrame.

  • y (pd.DataFrame) – Right DataFrame.

  • by (str or list of str) – Column name(s) to join on. Must exist in both x and y with matching dtypes.

Returns:

Union of rows from x and y, with NaN in columns unique to the side that didn’t match.

Return type:

pd.DataFrame

Examples

>>> import pandas as pd
>>> x = pd.DataFrame({"name": ["Mick", "John"]})
>>> y = pd.DataFrame({"name": ["John", "Keith"]})
>>> len(full_join(x, y, by="name"))
3