Skip to content

Commit

Permalink
fix freeze frames
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelsoup42 committed Oct 9, 2023
1 parent fa7780c commit e47467d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/cardano_account_pandas_dumper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def main():
warnings.warn(f"Failed to write CSV file: {exception}")
if args.xlsx_output:
try:
reporter.make_transaction_frame(
frame = reporter.make_transaction_frame(
with_total=args.with_total,
zero_is_nan=args.zero_is_nan,
text_cleaner=lambda x: ILLEGAL_CHARACTERS_RE.sub(
Expand All @@ -215,10 +215,16 @@ def main():
),
x,
),
).to_excel(
)
frame.to_excel(
args.xlsx_output,
sheet_name=f"Transactions to block {args.to_block}",
freeze_panes=(3 if args.raw_values else 2, 3),
freeze_panes=(
len(frame.columns[0]) + 1
if isinstance(type(frame.columns[0]), tuple)
else 2,
3,
),
)
except OSError as exception:
warnings.warn(f"Failed to write .xlsx file: {exception}")
Expand Down

0 comments on commit e47467d

Please sign in to comment.