diff --git a/src/nested_pandas/nestedframe/core.py b/src/nested_pandas/nestedframe/core.py index b26b2de..af40efa 100644 --- a/src/nested_pandas/nestedframe/core.py +++ b/src/nested_pandas/nestedframe/core.py @@ -387,11 +387,11 @@ def my_sum(col1, col2): for layer in layers: if layer == "base": columns = [col[1] for col in requested_columns if col[0] == layer] - apply_df = apply_df.join(self[columns], how="right") + apply_df = apply_df.join(self[columns], how="outer") else: # TODO: It should be faster to pass these columns to to_lists, but its 20x slower # columns = [col[1] for col in requested_columns if col[0] == layer] - apply_df = apply_df.join(self[layer].nest.to_lists(), how="right") + apply_df = apply_df.join(self[layer].nest.to_lists(), how="outer") # Translates the requested columns into the scalars or arrays we pass to func. def translate_cols(frame, layer, col):