Skip to content
Advertisement

Amount of months calculation in DataFrame in Python Pandas?

I have DataFrame like below:

JavaScript

And I need to calculate number of MONTHS from Date column until today. Below I upload result which I need:

Advertisement

Answer

You can modify this solution for subtract by scalar d:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement