albhu commited on
Commit
db3e9ca
·
verified ·
1 Parent(s): 59119de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -111,8 +111,8 @@ def calculate_late_interest(data, late_interest_rate, boe_rates_df):
111
  # Function to analyze Excel sheet and extract relevant information
112
  def analyze_excel(df):
113
  # Extract due dates and payment dates
114
- due_dates = df.iloc[:, 0].dropna().tolist()
115
- payment_dates = df.iloc[:, 1].dropna().tolist()
116
  amounts = []
117
 
118
  # Extract and clean amounts from third column
 
111
  # Function to analyze Excel sheet and extract relevant information
112
  def analyze_excel(df):
113
  # Extract due dates and payment dates
114
+ due_dates = pd.to_datetime(df.iloc[:, 0], errors='coerce').dropna() # Convert to datetime and drop NaT values
115
+ payment_dates = pd.to_datetime(df.iloc[:, 1], errors='coerce').dropna() # Convert to datetime and drop NaT values
116
  amounts = []
117
 
118
  # Extract and clean amounts from third column