title: Pandas - Get Series index during vectorized operation
body: <p>Say, I have a dataframe df where one of the columns is:</p>
  
  <pre><code>df['letters'] = pd.Series(['a','a','m','a'])
  </code></pre>
  
  <p>and I want to add a message column to the df, like below:
  (if something like index() existed, would be nice.)</p>
  
  <pre><code>message_col = np.where(df['letters']=='a','found','missing at index'+str(df['letters'].index()))
  </code></pre>
  
  <p>The result would be:</p>
  
  <pre><code>df['message_col'] = pd.Series(['found','found','missing at index 2','found'])
  </code></pre>