Skip to content

Commit

Permalink
fix inplace
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethmhc committed Jul 9, 2024
1 parent 16e40f7 commit fb6642d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/hsfs/engine/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ def _apply_transformation_function(
str, transformation_function_attached.TransformationFunctionAttached
],
dataset: Union[pd.DataFrame, pl.DataFrame],
inplace=False,
inplace=True,
) -> Union[pd.DataFrame, pl.DataFrame]:
for (
feature_name,
Expand All @@ -1205,15 +1205,15 @@ def _apply_transformation_function(
if isinstance(dataset, pl.DataFrame) or isinstance(
dataset, pl.dataframe.frame.DataFrame
):
if inplace:
if not inplace:
dataset = dataset.clone()
dataset = dataset.with_columns(
pl.col(feature_name).map_elements(
transformation_fn.transformation_fn
)
)
else:
if inplace:
if not inplace:
dataset = pd.DataFrame.copy(dataset)
dataset[feature_name] = dataset[feature_name].map(
transformation_fn.transformation_fn
Expand Down

0 comments on commit fb6642d

Please sign in to comment.