DataFrame indexing with DatetimeIndex
pydata.narkive.com › bKDfp6oX › dataframe-indexingWith simple indexing I'm getting a KeyError, eventhough the dates I'm. indexing with match the dates in the DataFrame index by construction. Here. is a minimal example code. import pandas as pd. dates = pd.date_range ('01-Jan-2014', periods=3, freq='MS') df = pd.DataFrame (ones ( [3, 10]), index=dates) df [dates] KeyError: " ['2014-01-01T00:00 ...