Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

REMOVE ALL ROWS FROM DATFRAME WGICH HAS DATA OLDER THAN 3 MONTHS PANDAS

from datetime import date
from dateutil.relativedelta import relativedelta

#http://stackoverflow.com/questions/546321/how-do-i-calculate-the-date-six-months-from-the-current-date-using-the-datetime
six_months = date.today() - relativedelta( months = +6 )
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #REMOVE #ALL #ROWS #FROM #DATFRAME #WGICH #HAS #DATA #OLDER #THAN #MONTHS #PANDAS
ADD COMMENT
Topic
Name
4+8 =