XPMaster commited on
Commit
7a95dc9
·
1 Parent(s): 6b636f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -245,8 +245,8 @@ def fill_missing_quarters(df, lob, acc, transaction):
245
 
246
  l_missing_df[lob] = l
247
  missing_quarters.append(l_missing_df)
248
- for c_lob in lobs_dict.keys():
249
- filled.append(c_lob+" paddings sum (0.1): "+str(lobs_dict[c_lob]))
250
  filled.append("Total paddings (0.1): "+str(missing_count))
251
  print("=="*100)
252
  print('Unique values in', acc, 'for missing quarters:', l_missing_df[acc].unique())
@@ -626,7 +626,6 @@ def process(files,button):
626
  # sum new
627
  ncols = df.columns
628
  sums_new = ['{:,.2f}'.format(df[col].sum()) if np.issubdtype(df[col].dtype, np.number) else "-" for col in ncols]
629
-
630
  #display(df)
631
  name = os.path.basename(name)
632
  #print(columns)
@@ -636,6 +635,9 @@ def process(files,button):
636
  sheetwarnings = [warnings,'FFA500']
637
  if len(filled_warn) == 0:
638
  filled_warn = ['No fillings']
 
 
 
639
  sheet_data[name] = {
640
  "Before columns": [old_olds],
641
  'Sum Before':[sums_old,None,True],
 
245
 
246
  l_missing_df[lob] = l
247
  missing_quarters.append(l_missing_df)
248
+
249
+ filled.append([lobs_dict.keys(),lobs_dict[c_lob]])
250
  filled.append("Total paddings (0.1): "+str(missing_count))
251
  print("=="*100)
252
  print('Unique values in', acc, 'for missing quarters:', l_missing_df[acc].unique())
 
626
  # sum new
627
  ncols = df.columns
628
  sums_new = ['{:,.2f}'.format(df[col].sum()) if np.issubdtype(df[col].dtype, np.number) else "-" for col in ncols]
 
629
  #display(df)
630
  name = os.path.basename(name)
631
  #print(columns)
 
635
  sheetwarnings = [warnings,'FFA500']
636
  if len(filled_warn) == 0:
637
  filled_warn = ['No fillings']
638
+ else:
639
+ tempt_list = [element for element in filled_warn[-2][0] if element in columns]
640
+ filled_warn[-2] = "Padded columns "+str(filled_warn[-2][0])+" with total of "+str(round(filled_warn[-2][1]))
641
  sheet_data[name] = {
642
  "Before columns": [old_olds],
643
  'Sum Before':[sums_old,None,True],