Skip to content

Commit 5a1feb8

Browse files
committed
drop _store_columns change
1 parent 4909d7a commit 5a1feb8

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

rdt/transformers/base.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -259,25 +259,16 @@ def get_output_columns(self):
259259
return list(self._get_output_to_property('sdtype'))
260260

261261
def _store_columns(self, columns, data):
262-
"""Store the column names to be transformed.
262+
if isinstance(columns, tuple) and columns not in data:
263+
columns = list(columns)
264+
elif not isinstance(columns, list):
265+
columns = [columns]
263266

264-
Args:
265-
columns (str, list, tuple):
266-
Column name(s) to be transformed.
267-
data (pandas.DataFrame):
268-
The entire table.
269-
"""
270-
column_names = columns
271-
if isinstance(column_names, tuple) and column_names not in data:
272-
column_names = list(column_names)
273-
elif not isinstance(column_names, list):
274-
column_names = [column_names]
275-
276-
missing = set(column_names) - set(data.columns)
267+
missing = set(columns) - set(data.columns)
277268
if missing:
278269
raise KeyError(f'Columns {missing} were not present in the data.')
279270

280-
self.columns = column_names
271+
self.columns = columns
281272

282273
@staticmethod
283274
def _get_columns_data(data, columns):

0 commit comments

Comments
 (0)