Skip to content

Commit

Permalink
remove spaces from data frame
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikmathpal authored Jul 28, 2017
1 parent 5aa9215 commit 6b951dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions datacleaner/datacleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def autoclean(input_dataframe, drop_nans=False, copy=False, encoder=None,
column_encoder = LabelEncoder().fit(input_dataframe[column].values)

input_dataframe[column] = column_encoder.transform(input_dataframe[column].values)

input_dataframe.columns = [c.strip() for c in input_dataframe.columns]
return input_dataframe

def autoclean_cv(training_dataframe, testing_dataframe, drop_nans=False, copy=False,
Expand Down Expand Up @@ -174,8 +174,7 @@ def autoclean_cv(training_dataframe, testing_dataframe, drop_nans=False, copy=Fa
training_dataframe[column] = column_encoder.transform(training_dataframe[column].values)
testing_dataframe[column] = column_encoder.transform(testing_dataframe[column].values)

training_dataframe.columns = [c.strip() for c in training_dataframe.columns]
testing_dataframe.columns = [c.strip() for c in testing_dataframe.columns]


return training_dataframe, testing_dataframe

Expand Down

0 comments on commit 6b951dc

Please sign in to comment.