我有一个带有两级MultiIndex的MultiIndex.第一级date是一个DatetimeIndex,第二级name只是一些字符串。数据有10分钟的间隔。如何在此MultiIndex的第一级按日期分组并计算每天的行数?我怀疑DatetimeIndex耦合到MultiIndex会给我带来问题,因为给我
TypeError:Only valid with DatetimeIndex, Ti
新的pandas版本不推荐使用TimeGrouper,所以我们应该使用常规的Grouper。老代码:在旧版本的pandas中运行良好。with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'Float64Index'import pa