I have the following timeserie:
start = pd.to_datetime(\'2016-1-1\')
end = pd.to_datetime(\'2016-1-15\')
rng = pd.date_range(start, end, freq=\'2h\')
df = pd.Dat
using query
df.query('index < @start_remove or index > @end_remove')
using loc
df.loc[(df.index < start_remove) | (df.index > end_remove)]
using date slicing
This includes the end points
pd.concat([df[:start_remove], df[end_remove:]])
And without the end points
pd.concat([df[:start_remove], df[end_remove:]]).drop([start_remove, end_remove])