I have a dataframe with a series of floats called balance
and a series of timestamps called due_date
. I'd like to create a new column called current
that displays the balance
if the due_date
is >= today (all else ""
), a column called 1-30 Days
that displays the balance
if the due_date
is 1 to 30 days ago (all else ""
), and a column called >30 Days
that displays the balance
if the due_date
is more than 30 days ago (all else ""
).
Here are some example rows:
balance due_date
0 250.00 2017-10-22
1 400.00 2017-10-04
2 3000.00 2017-09-08
3 3000.00 2017-09-08
4 250.00 2017-08-05
Any help would be greatly appreciated.