relativedelta Questions
3
I wish to get the total duration of a relativedelta in terms of days.
Expected:
dateutil.timedelta(1 month, 24 days) -> dateutil.timedelta(55 days)
What I tried:
dateutil.timedelta(1 month...
Title asked 12/1, 2015 at 18:2
5
Solved
Here's my data
Customer_id Date-of-birth
1 1992-07-02
2 1991-07-03
Here's my code
import datetime as dt
df['now'] = dt.datetime.now()
df['age'] = df['now'].dt.date - df['Date-of-birth']
Here'...
Gielgud asked 24/7, 2018 at 6:31
1
© 2022 - 2024 — McMap. All rights reserved.