title: Slope from linear regression
body: <p>I have a plot-</p>
  
  <p><a href="https://i.stack.imgur.com/3E1dB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3E1dB.png" alt="enter image description here"></a></p>
  
  <p>When I am trying to do linear regression on it-</p>
  
  <pre><code>df=pd.read_csv('tau.csv')
  
  
  xx= df['xx'].tolist()
  yy=df['yy'].tolist()
  from scipy.stats import linregress
  #print(linregress(xx,yy))
  
  slope, intercept, r_value, p_value, std_err=linregress(xx,yy)
  print(slope)
  
  plt.plot(xx,yy,'ro')
  plt.xlabel('log(l)')
  plt.ylabel('log(Rl)')
  plt.title('Fractal dimension with '+str(slope))
  plt.show()
  </code></pre>
  
  <p>I get the slope as nan.</p>
  
  <p>my data-</p>
  
  <p><a href="https://i.stack.imgur.com/r2UPg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r2UPg.png" alt="enter image description here"></a></p>