XPMaster commited on
Commit
8cf2caa
·
1 Parent(s): 1e00380

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -193,6 +193,7 @@ def col_to_ints(df,columns_to_convert):
193
 
194
  def fill_missing_quarters(df, lob, acc, transaction):
195
  filled = []
 
196
  print('accident',acc,'transaction',transaction)
197
  columns_to_convert = [acc,transaction] # Only affect acc and transaction
198
 
@@ -228,6 +229,7 @@ def fill_missing_quarters(df, lob, acc, transaction):
228
  l_missing_df[col] = [str(end_year) + '12'] * len(l_quarters)
229
  else:
230
  l_missing_df[col] = 0.1
 
231
 
232
  if len(l_quarters) > 0 :
233
  filled_warn = str(l)+' was filled with the dates '+str(l_quarters)
@@ -237,6 +239,7 @@ def fill_missing_quarters(df, lob, acc, transaction):
237
  l_missing_df[lob] = l
238
  missing_quarters.append(l_missing_df)
239
 
 
240
  print("=="*100)
241
  print('Unique values in', acc, 'for missing quarters:', l_missing_df[acc].unique())
242
  # Concatenate the original dataframe and the missing quarters dataframe
 
193
 
194
  def fill_missing_quarters(df, lob, acc, transaction):
195
  filled = []
196
+ missing_count = 0
197
  print('accident',acc,'transaction',transaction)
198
  columns_to_convert = [acc,transaction] # Only affect acc and transaction
199
 
 
229
  l_missing_df[col] = [str(end_year) + '12'] * len(l_quarters)
230
  else:
231
  l_missing_df[col] = 0.1
232
+ missing_count = missing_count + 1
233
 
234
  if len(l_quarters) > 0 :
235
  filled_warn = str(l)+' was filled with the dates '+str(l_quarters)
 
239
  l_missing_df[lob] = l
240
  missing_quarters.append(l_missing_df)
241
 
242
+ filled.append("Missing total: "+str(missing_count))
243
  print("=="*100)
244
  print('Unique values in', acc, 'for missing quarters:', l_missing_df[acc].unique())
245
  # Concatenate the original dataframe and the missing quarters dataframe