title: How to fill the Pandas Dataframe based on values from another two dataframes
body: <p>I have 4 pandas dataframe,
  First two are Categorical and Numeric Values df,</p>
  
  <pre><code>Cat_data = [
          ['Color', 'red', 0.2543], 
          ['Color', 'orange',0.1894], 
          ['Color', 'yellow',-0.2836],
          ['Fruit', 'orange', -1.3647], 
          ['Fruit','banana',0.3648]
          ] 
  
  Cat_df = pd.DataFrame(Cat_data, columns = ['Variable', 'Cats', 'Value']) 
  
  Num_data = [
          ['Quantity', '-inf', '5', 0.2145], 
          ['Quantity', '5', '10', 0.0268], 
          ['Quantity', '10', 'inf', -0.5421], 
          ['Rating', '-inf', '0.5', 0.6521], 
          ['Rating','0.5', 'inf', -0.4378], 
          ] 
  
  Num_df = pd.DataFrame(Num_data, columns = ['Variable', 'Inclusive', 'Exclusive', 'Value']) 
  </code></pre>
  
  <p>In the Num_data 'Inclusive' and 'Exclusive' are checking values, </p>
  
  <p>say on the first record >= -inf and &lt; 5 , </p>
  
  <p>same for second record values >=5 and &lt; 10, values come from Actual_df</p>
  
  <p>Third Dataframe is the actual values</p>
  
  <pre><code>Actual_data = [
          ['yellow', 'banana', '4', '0.5'] 
          ] 
  
  Actual_df = pd.DataFrame(Actual_data, columns = ['Color', 'Fruit', 'Quantity', 'Rating']) 
  </code></pre>
  
  <p>Fourth is the Value DataFrame with column names same as Actual_df</p>
  
  <pre><code>Value_df = pandas.DataFrame(numpy.zeros((1, 4)),
  columns = ['Color', 'Fruit', 'Quantity', 'Rating'])
  </code></pre>
  
  <p>I need to fill the Value_df with the 'Value' from Cat_data and Num_data 'Value' columns corresponding to the data in Actual_data, I am not sure how to merge the four df's and take values to check the Inclusive and Exclusive columns along with that.</p>
  
  <p>In Actual Data we have 'yellow', 'banana', '4', '0.5' the value corresponding to</p>
  
  <p>yellow is in Cat_df as -0.2836</p>
  
  <p>banana is in Cat_df as 0.3648</p>
  
  <p>Quantity is in Num_df as 0.2145</p>
  
  <p>Rating is in Num_df as -0.4378</p>
  
  <p>My Result DataFrame of Value_df will be</p>
  
  <pre><code>Color    Fruit   Quantity   Rating
  -0.2836  0.3648  0.2145     -0.4378
  </code></pre>
  
  <p>For the Cat_data, I did like</p>
  
  <pre><code>Value_df['Color'] = Actual_df['Color'].map(Cat_df.set_index('Cats')['Value'])
  </code></pre>
  
  <p>The issue for the color and fruit both orange, which value will be taken is the problem, so I have to match variable as well, I get error as</p>
  
  <pre><code>InvalidIndexError: Reindexing only valid with uniquely valued Index objects
  </code></pre>