Skip to content

Commit

Permalink
fix: Feedback addressed by removing unnecessary empty lines in functions
Browse files Browse the repository at this point in the history
  • Loading branch information
xximing committed Feb 2, 2025
1 parent cec8888 commit 09aafef
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/datamop/column_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def column_encoder(data, columns, method='one-hot', order=None):
if column not in columns:
raise ValueError(f"The column '{column}' specified in order is not in the column list")


custom_order = order[column]
unique_values = encoded_df[column].unique()
#check if order match what is inside column
Expand Down
2 changes: 0 additions & 2 deletions src/datamop/column_scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def column_scaler(data, column, method="minmax", new_min=0, new_max=1, inplace=T
return data.copy()

# Error handling

if column not in data.columns:
raise KeyError("Column not found in the DataFrame.")
if not pd.api.types.is_numeric_dtype(data[column]):
Expand All @@ -87,7 +86,6 @@ def column_scaler(data, column, method="minmax", new_min=0, new_max=1, inplace=T
midpoint = (new_min + new_max) / 2
scaled_column = pd.Series([midpoint] * len(data), index=data.index)


# Scale the column
else:
# minmax scaling
Expand Down

0 comments on commit 09aafef

Please sign in to comment.