回答編集履歴

1

補足追加

2020/03/11 00:01

投稿

magichan
magichan

スコア15898

test CHANGED
@@ -31,3 +31,27 @@
31
31
  #2 003 ubuntu
32
32
 
33
33
  ```
34
+
35
+
36
+
37
+ `server id` が 重複がなく、**Index**になっていているのでしたら、単純に Filterでもいけますね。
38
+
39
+
40
+
41
+ ```Python
42
+
43
+ df = df.set_index('server id', drop=True)
44
+
45
+ ret = df.loc[id_list]
46
+
47
+ print(ret)
48
+
49
+ # os
50
+
51
+ #server id
52
+
53
+ #001 Windows
54
+
55
+ #003 ubuntu
56
+
57
+ ```