举一个简单的pd.Series: #create the multiindex and data
mult = pd.MultiIndex.from_product([[1,2,3],[1,2,3]],names=['factor1','factor2'])
data = np.arange(1,4)*np.arange(1,4)[:,np.newaxis]
#create the ser
我正在寻找一种方法来按星期几和/或选定日期筛选多索引数据框。假设我需要 查询到select only mondays; 另一个查询,其中我想select all days except monday and friday; 第三个查询选择日期输入列表中的数据,如select all dates in ['2015-05-14', '2015-05-21', '2015-05-22']; 最后,查询