How can I get a previous row from where the condition is met in data frame in Pandas
<p>For instance, I have a data frame below, I want to get the timestamp from the previous row where the Value is 1</p>

<pre><code>    TIME    VALUE
0   23:01   0
1   23:02   0
2   23:03   1
3   23:04   0
4   23:05   0
5   23:06   1
6   23:07   0
7   23:08   0
8   23:09   0
9   23:10   0
10  23:11   1
11  23:12   0
12  23:13   0
13  23:14   0
14  23:15   0
15  23:16   1
</code></pre>

<p>I want to get the following as an output</p>

<pre><code>    PREV_TIME
0   23:02
1   23:05
2   23:10
3   23:15
</code></pre>

<p>I don't know where to put <code>shift(1)</code> in the following</p>

<pre><code>PREV_TIME = df['Time'][(df.Value == 1)]
</code></pre>