Код: Выделить всё
import numpy as np
import pandas as pd
index = pd.date_range('2016-01-28', freq='d', periods=6)
columns=list('A')
values = np.random.randint(1,10, size=(len(index), len(columns)))
df = pd.DataFrame(values, index=index, columns=columns)
print(df[df.index=='2016-01'])
Код: Выделить всё
Empty DataFrame
Columns: [A]
Index: []
Подробнее здесь: https://stackoverflow.com/questions/785 ... -attribute