How to select pandas Series values start with a specific text?
<p>I want to select a specific column's value from Pandas DataFrame which value start with a specific text. If True, the next column will be updated with the content from previous column's value.</p>

<p>For example, I have a DataFrame <code>df_1</code>, and I want <code>a2</code> update with values that <code>a1</code> start with <code>as</code>.</p>

<pre><code>df_1 = pd.DataFrame({'a1':['amtr1',np.nan,'astr2',np.nan,'gbstr2','mkstr2','gbstr2','astr1'],
                     'a2':[np.nan]*8})
df_1

    a1      a2
0   amtr1   NaN
1   NaN     NaN
2   astr2   NaN
3   NaN     NaN
4   gbstr2  NaN
5   mkstr2  NaN
6   gbstr2  NaN
7   astr1   NaN
</code></pre>

<p>I want this output.</p>

<pre><code>    a1      a2
0   amtr1   NaN
1   NaN     NaN
2   astr2   astr2
3   NaN     NaN
4   gbstr2  NaN
5   mkmk2   NaN
6   gbstr2  NaN
7   astr1   astr1
</code></pre>