title: Assign values to a dataframe by considering values in 2 columns of different dataframe as range
body: <p>The following code explains the scenario,
  I have a dataframe(df_ticker) with 3 columns</p>
  
  <pre><code>import pandas as pd 
  df_ticker = pd.DataFrame({'Min_val': [22382.729,36919.205,46735.164,62247.61], 'Max_val': [36901.758,46716.06,62045.06,182727.05],
             'Ticker':['$','$$','$$$','$$$$']})
  df_ticker`
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/lX9dy.png" rel="nofollow noreferrer">df_ticker</a>
  My second dataframe contains 2 columns</p>
  
  <pre><code>df_values = pd.DataFrame({'Id':[1,2,3,4,5,6],'sal_val': [3098,45639.987,65487.4,56784.8,8,736455]})
  df_values  `
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/GmTTD.png" rel="nofollow noreferrer">df_values</a></p>
  
  <p>For every value in df_values ['sal_val'], I want to check in which range it falls in df_ticker [Max_val] and df_ticker [min_val] and assign df_ticker [ticker] accordingly.<br>
  Sample output would be something like this, <a href="https://i.stack.imgur.com/7y9Bq.png" rel="nofollow noreferrer">sample_output</a><br>
  In the sample output, sal_val=3098 is greater than or equal to Min_val=22382.729 and less than or equal to max_val=36901.75, it was assigned ticker=$</p>
  
  <p>I tried the following,</p>
  
  <pre><code>  df_values['ticker']=df_ticker.\
  loc[((df_values['sal_val']&gt;=df_ticker['Min_val'])| (df_values['sal_val']&lt;=df_ticker['Max_val']))]['Ticker']
  df_values  
  </code></pre>
  
  <p>It failed with error "ValueError: Can only compare identically-labeled Series objects"  </p>
  
  <p>Any solutions for this issue?</p>