Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -254,10 +254,11 @@ def fill_missing_quarters(df, lob, acc, transaction):
|
|
| 254 |
filled_df = filled_df.reset_index(drop=True)
|
| 255 |
# Print the filled quarters or a message if there are no missing quarters
|
| 256 |
filled_quarters = filled_df[acc].unique()
|
| 257 |
-
|
| 258 |
if len(filtered_quarters) == 0:
|
| 259 |
-
|
| 260 |
-
|
|
|
|
| 261 |
else:
|
| 262 |
pass#print(filtered_quarters)
|
| 263 |
|
|
|
|
| 254 |
filled_df = filled_df.reset_index(drop=True)
|
| 255 |
# Print the filled quarters or a message if there are no missing quarters
|
| 256 |
filled_quarters = filled_df[acc].unique()
|
| 257 |
+
filtered_quarters = [q for q in filled_quarters if q[:4] in [str(year1) for year1 in range(start_year, end_year + 1)]]
|
| 258 |
if len(filtered_quarters) == 0:
|
| 259 |
+
msg = "No missing quarters between "+start_year+"-"+str(end_year)
|
| 260 |
+
print(msg)
|
| 261 |
+
filled.append(msg)
|
| 262 |
else:
|
| 263 |
pass#print(filtered_quarters)
|
| 264 |
|