title: TypeError(f"cannot convert the series to {converter}"
body: <p>I'm trying to calculate local similarities using case base reasoning algorithm.
  However, I encounter this type error where is in series.py?
  Can someone pls tell me what does it mean? How to solve this problem?</p>
  <pre><code>#loop
  for i in range(pCase_base.shape[0]):
      for j in range(pCase_base.shape[1]):
          local_similarity[i,j]=1-(abs(pCases.iloc[:,j]-pCase_base.iloc[i,j])/range_value.iloc[j])
          
          print(f'For case {i+1}:{library.columns[j]},\tlocal similarity is {local_similarity[i,j]}')
      print('\n')
  </code></pre>
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  ~\anaconda3\lib\site-packages\pandas\core\series.py in wrapper(self)
      140             return converter(self.iloc[0])
  --&gt; 141         raise TypeError(f&quot;cannot convert the series to {converter}&quot;)
      142 
  
  TypeError: cannot convert the series to &lt;class 'float'&gt;
  
  The above exception was the direct cause of the following exception:
  
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-281-05f4f1442b8c&gt; in &lt;module&gt;
        2 for i in range(pCase_base.shape[0]):
        3     for j in range(pCase_base.shape[1]):
  ----&gt; 4         local_similarity[i,j]=1-(abs(pCases.iloc[:,j]-pCase_base.iloc[i,j])/range_value.iloc[j])
        5 
        6         print(f'For case {i+1}:{library.columns[j]},\tlocal similarity is {local_similarity[i,j]}')
  
  ValueError: setting an array element with a sequence.
  </code></pre>
  <p>Can pls help me to identify what is the problem?</p>