Skip to content

Commit

Permalink
[#530] Fix df unstack ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
wayangalihpratama committed Mar 25, 2024
1 parent eff2c91 commit 73c454b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions backend/util/sheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def write_sheet(df, writer, sheet_name, show_comment=False):
if sheet_name != main_sheet_name:
cols = [
"data_id",
"repeat_index",
"question_group_name",
"question_name",
"repeat_index", # ordering by question first, then index
"member_type",
"submitted",
]
Expand Down Expand Up @@ -79,9 +79,6 @@ def write_sheet(df, writer, sheet_name, show_comment=False):
df = df.unstack(unstack_col)
df.columns = df.columns.rename("", level=1)
df.columns = df.columns.rename("", level=2)
# ordering columns
# will do later
# EOL ordering columns
if len(sheet_name) > 20:
sheet_name = sheet_name[:15] + "..."
df = df[answer_col]
Expand Down

0 comments on commit 73c454b

Please # to comment.