temp = (
    'TRX_DATE;A\n2013-07-05;1\n2013-08-06;1\n2015-09-05;2\n2015-10-08;2\n2015-11-05;2\n2015-11-25;2\n2015-12-06;3'
    )
df = pd.read_csv(io.StringIO(temp), sep=';', parse_dates=[0])
print(df)
print(df.dtypes)
currentdate = dt.date.today()
print(currentdate)
startdate = currentdate - pd.Timedelta(days=30)
print(startdate)
dflast30 = df[(df.TRX_DATE >= startdate) & (df.TRX_DATE <= currentdate)]
print(dflast30)
how to slice a dataframe having date field as index?