eternaut commited on
Commit
1e10061
·
verified ·
1 Parent(s): 2b16cb9

Upload interface.py

Browse files
Files changed (1) hide show
  1. src/interface.py +1 -1
src/interface.py CHANGED
@@ -425,7 +425,7 @@ class makeInterface:
425
  # Step 6: Dynamically set column widths based on content
426
  for idx, col in enumerate(dftosave.columns):
427
  # Calculate the maximum length of the column content
428
- max_length = dftosave[col].fillna('').astype(str).map(len).max()
429
  max_length = max(max_length, len(str(col))) + 2 # Adding extra space
430
  worksheet.set_column(idx, idx, max_length, data_format)
431
 
 
425
  # Step 6: Dynamically set column widths based on content
426
  for idx, col in enumerate(dftosave.columns):
427
  # Calculate the maximum length of the column content
428
+ max_length = dftosave[col].astype(object).fillna('').astype(str).map(len).max()
429
  max_length = max(max_length, len(str(col))) + 2 # Adding extra space
430
  worksheet.set_column(idx, idx, max_length, data_format)
431