Skip to content

Commit

Permalink
Fixed values_to_cols() metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
argenisleon committed Nov 8, 2019
1 parent b2fe7d3 commit 00b6ba2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions optimus/dataframe/columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -2113,10 +2113,15 @@ def join_all(_dfs):

# names = before.cols.names(keys, invert=True)
# print(names)
pivotDF = pivotDF.preserve_meta(self)
df = pivotDF.toDF(*names).cols.fill_na(new_names, 0)
# df.table()
df = df.preserve_meta(self, Actions.VALUES_TO_COLS.value, new_names)

combined.append(df)
return join_all(combined)

df = join_all(combined)

return df

@add_attr(cols)
def string_to_index(input_cols=None, output_cols=None, columns=None):
Expand Down
1 change: 1 addition & 0 deletions optimus/helpers/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class Actions(Enum):
NEST = "nest"
UNNEST = "unnest"
DROP_ROW = "drop_row"
VALUES_TO_COLS = "values_to_cols"

@staticmethod
def list():
Expand Down

0 comments on commit 00b6ba2

Please sign in to comment.