0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

グループ化して操作を加える pandas

Posted at

#複数のIDを有するdataframeがあり、時系列になっています。
経過の中にはそれぞれのIDに対し”開始”、”終了”といったイベント(経過)が記録されています。今各IDで開始から終了までの血圧を取り出したいどうすればよいでしょうか?まず、groupbyでグループ化し、それをdataframeにもどし…、わかりません(´;ω;`)
image.png
ID 経過 血圧
1 90
1 開始 100
1 90
1 60
1 終了 70
1 90
2 100
2 開始 80
2 90
2 100
2 110
2 終了 90
2 80
3 120
3 110
3 開始 90
3 90
3 終了 110
3 120
3 90
3 130

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?