回答編集履歴
1
追記
test
CHANGED
@@ -1,3 +1,39 @@
|
|
1
|
+
【追記】
|
2
|
+
|
3
|
+
```Python
|
4
|
+
|
5
|
+
import pandas as pd
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
df = pd.DataFrame({'A':[1,2,3],'B':[4,5,6]})
|
10
|
+
|
11
|
+
print(df)
|
12
|
+
|
13
|
+
# A B
|
14
|
+
|
15
|
+
#0 1 4
|
16
|
+
|
17
|
+
#1 2 5
|
18
|
+
|
19
|
+
#2 3 6
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
print(df[[True, False, True]])
|
24
|
+
|
25
|
+
# A B
|
26
|
+
|
27
|
+
#0 1 4
|
28
|
+
|
29
|
+
#2 3 6
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
```
|
34
|
+
|
35
|
+
---
|
36
|
+
|
1
37
|
```Python
|
2
38
|
|
3
39
|
df[[True, False]]
|