Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In[1]
- df = {'Loan Nego': [2019-03-01, 2019-03-01], 'New Maturity': [2019-03-11, 2019-03-29],'Loan Amount in OCUR': [1000, 2000]}
- Out[1]
- Loan Nego New Maturity Loan Amount in OCUR
- 2019-03-01 2019-03-11 1000
- 2019-03-01 2019-03-29 2000
- In[2]
- df.dtypes
- Out[2]
- New Maturity datetime64[ns]
- Loan Nego datetime64[ns]
- Loan Amount in OCUR float64
- # Equation CLOF
- def clof(loan,maturity, amount):
- days = (maturity-loan).days
- return ((amount * days)/ 360) * (2.36/100)
- df["New Interest"] = clof(df["Loan Nego"],df["New Maturity"],df["Loan Amount in OCUR"])
- Loan Nego New Maturity Loan Amount in OCUR New Interest
- 2019-03-01 2019-03-11 1000 0.65
- 2019-03-01 2019-03-29 2000 3.671
- days = (maturity-loan).dt.days
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement