I am creating a DataFrame from a csv as follows:
stock = pd.read_csv(\'data_in/\' + filename + \'.csv\', skipinitialspace=True)
The DataFra
I feel the best option will be to use the direct checks rather than using loc function:
df = df[(df['date'] > '2000-6-1') & (df['date'] <= '2000-6-10')]
It works for me.
Major issue with loc function with a slice is that the limits should be present in the actual values, if not this will result in KeyError.