我的数据集df
如下所示:
Date Value
...
2012-07-31 61.9443
2012-07-30 62.1551
2012-07-27 62.3328
... ...
2011-10-04 48.3923
2011-10-03 48.5939
2011-09-30 50.0327
2011-09-29 51.8350
2011-09-28 50.5555
2011-09-27 51.8470
2011-09-26 49.6350
... ...
2011-08-03 61.3948
2011-08-02 61.5476
2011-08-01 64.1407
2011-07-29 65.0364
2011-07-28 65.7065
2011-07-27 66.3463
2011-07-26 67.1508
2011-07-25 67.5577
... ...
2010-10-05 57.3674
2010-10-04 56.3687
2010-10-01 57.6022
2010-09-30 58.0993
2010-09-29 57.9934
下面是两列的数据类型:
Type Column Name Example Value
-----------------------------------------------------------------
datetime64[ns] Date 2020-06-19 00:00:00
float64 Value 108.82
我希望其中的一个子集df
仅包含选择了 10 月的第一个条目和7 月的最后一个条目的行:
Date Value
...
2012-07-31 61.9443
2011-10-03 48.5939
2011-07-29 65.0364
2010-10-01 57.6022
知道怎么做吗?