title: Issues populating dictionary with float values from Excel Pandas
body: <p>I'm using an excel spreadsheet to populate a dictionary. Then I'm using those values to multiply the values of another data frame by reference, but it gives me errors when I try. I decided to make the excel spreadsheet out my dictionary to avoid errors, but I haven't been successful. I'm doing this because the dictionary eventually gets long and it's too tedious to edit the keys and its values. I'm using Python 2.7</p>
  
  <pre><code>import pandas as pd
  
  #READ EXCEL FILE
  df = pd.read_excel("C:/Users/Pedro/Desktop/dataframe.xls")
  
  #Store the keys with its value in a dictionary. This will become df2
  d = {"M1-4":0.60,"M1-5/R10":0.85,"C5-3":0.85,"M1-5/R7-3":0.85,"M1-4/R7A":0.85,"R7A":0.85,"M1-4/R6A":0.85,"M1-4/R6B":0.85,"R6A":0.85,"PARK":0.20,"M1-6/R10":0.85,"R6B":0.85,"R9":0.85,"M1-5/R9":0.85}
  
  #Convert the dictionary to an Excel spreadsheet
  df5 = pd.DataFrame.from_dict(d, orient='index')
  df5.to_excel('bob_dict.xlsx')
  
  #populatethe dictionary from the excel spreadsheet
  df2 = pd.read_excel("C:/Users/Pedro/Desktop/bob_dict.xlsx")
  #Convert dtframe back to a dictionary
  dictionary = df2.to_dict(orient='dict')
  #Pass the dictionary as reference 
  
  b = df.filter(like ='Value').values
  c = df.filter(like ='ZONE').replace(dictionary).astype(float).values
  
  df['pro_cum'] = ((c * b).sum(axis =1))
  </code></pre>
  
  <p>When run this I get  ValueError: could not convert R6B string to float.</p>
  
  <pre><code>c = df.filter(like ='ZONE').replace(d).astype(float).values
  </code></pre>
  
  <p>but if I replace the zone values by the original dictionary it runs without errors.</p>
  
  <p>Input : df</p>
  
  <pre><code>HP    ZONE           Value  ZONE1       Value1
  3     R7A           0.7009  M1-4/R6B    0.00128
  2     R6A           0.5842  M1-4/R7A    0.00009
  7     M1-6/R10      0.1909  M1-4/R6A    0.73576
  9     R6B           0.6919  PARK        0.03459
  6     PARK          1.0400  M1-4/R6A    0.33002
  9.3   M1-4/R6A      0.7878  PARK        0.59700
  10.6  M1-4/R6B      0.0291  R6A         0.29621
  11.9  R9            0.0084  M1-4        0.00058
  13.2  M1-5/R10      0.0049  M1-4        0.65568
  14.5  M1-4/R7A      0.0050  C5-3        0.00096
  15.8  M1-5/R7-3     0.0189  C5-3        1.59327
  17.1  M1-5/R9       0.3296  M1-4/R6B    0.43918
  18.4  C5-3          0.5126  R6B         0.20835
  19.7  M1-4          0.5126  PARK        0.22404
  </code></pre>