type
= 'Email'を含む行の直後に最初の行のみを抽出する方法はありますか?SQL Server:特定のテキストを含む行の後に続く行を抽出する
サンプルテーブル:
id type details
1 Email [email protected]
2 1234 1234
3 Email [email protected]
4 12345 12345
5 123456 123456
6 Email [email protected]
7 1234567 1234567
8 12345678 12345678
9 123456789 123456789
10 Email [email protected]
11 01 01
12 Email [email protected]
13 012 012
14 Email [email protected]
15
Pythonとパンダで、私は、出力は次のようになり
indexes = table[table['type']=='Email'].index + 1
table = table.ix[indexes]
...このような何かを書くと...
2 1234 1234
4 12345 12345
7 1234567 1234567
11 01 01
13 012 012
15
恐ろしい!ありがとうDudu - これは素晴らしい作品です。 –
「遅れ」とはどういう意味ですか...キーワードなどありますか? – Darshak
ラグは、次の値を取得するために使用できる関数です –