Python difference in years between a datetime.now() and a Series filled up with dates?
问题 I would like to create a new column in my dataset, which is a difference in years between today and a another column already in the dataset, filled up with dates. the code above: df['diff_years'] = datetime.today() - df['some_date'] df['diff_years'] give me the following output (exemple): 1754 days 11:44:28.971615 and i have to get something like (meaning the output above in years): 4,8 (or 5) I appreciate any help! PS.: i would like to avoid looping the series, path i believe would give me a