2016-06-09 92 views
0

排除一天如果我要選擇從以下數據框中我可以使用這個命令的範圍:從從熊貓數據框中日期範圍

bars_specified_days = bars['2016-05-27':'2016-06-03'] 

如何排除單日(2016年5月30日)範圍2016-05-27:2016-06-03?


bars_specified_days.describe 

<bound method NDFrame.describe of Timestamp 
2016-06-03 09:31:07  1.0 
2016-06-03 09:31:28  1.0 
2016-06-03 09:31:30  40.0 
2016-06-03 09:31:31  1.0 
2016-06-03 09:31:54  2.0 
2016-06-03 09:31:55  28.0 
2016-06-03 09:32:12  86.0 
2016-06-03 09:32:13  17.0 
2016-06-03 09:32:17  51.0 
2016-06-03 09:32:20 203.0 
2016-06-03 09:32:24  30.0 
2016-06-03 09:32:29  5.0 
2016-06-03 09:32:30  1.0 
2016-06-03 09:32:41  1.0 
2016-06-03 09:32:49  1.0 
2016-06-03 09:32:54  5.0 
2016-06-03 09:33:03  10.0 
2016-06-03 09:33:09  5.0 
2016-06-03 09:33:10  5.0 
2016-06-03 09:33:37  7.0 
2016-06-03 09:33:42  1.0 
2016-06-03 09:33:43  1.0 
2016-06-03 09:33:44  1.0 
2016-06-03 09:33:53 219.0 
2016-06-03 09:33:54  4.0 
2016-06-03 09:34:04  1.0 
2016-06-03 09:34:08  1.0 
2016-06-03 09:34:09  66.0 
2016-06-03 09:34:39  5.0 
2016-06-03 09:34:47  2.0 
         ... 
2016-06-03 16:14:22  4.0 
SNIP...... 
Name: Volume, dtype: float64> 

回答

3
frame[frame.index != '2016-05-30']