Skip to content

Commit

Permalink
Create a New Dataframe for Map (#14)
Browse files Browse the repository at this point in the history
Previously, map would update the dataframe in place. Changing it so that
map creates a new dataframe. This fits better with the semantics of the
other operators.
  • Loading branch information
sidjha1 authored Oct 5, 2024
1 parent 6057141 commit 18275b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lotus/sem_ops/sem_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __call__(
strategy=strategy,
)

new_df = self._obj
new_df = self._obj.copy()
new_df[suffix] = outputs
if return_explanations:
new_df["explanation" + suffix] = explanations
Expand Down

0 comments on commit 18275b7

Please sign in to comment.