title: TypeError: unsupported operand type(s) for /: 'str' and 'float' problem
body: <p>My code as follows:
  import numpy as np
  import pandas as pd
  import matplotlib.pyplot as plt</p>
  <pre><code># All constant value in the code:
  G0 = 0.0000775  # Conductance quantum
  v = 0.1           # Bias voltage
  Time_of_Loops = 1399951  # Time collected by LabVIEW， unit is ms
  
  
  
  # read data:
  data = pd.read_csv(\
      'C:\\Users\\fq20881\\OneDrive - University of Bristol\\OneDrive\\Data Analysis\\Data.txt', \
      sep=',', names=['Current', 'Position', 'Current2', 'Time2', 'PZT Voltage'])
  
  
  data.drop([0, 1], axis=0, inplace=True)
  data.reset_index(drop=True, inplace=True)
  nrows1 = data.shape[0]
  print('row number of Current:')
  print(nrows1)
  
  data1 = pd.DataFrame(columns=['Time', 'Conductance'], index=range(0, nrows1))
  Speed_Time = Time_of_Loops / (nrows1 * 1000)
  data1['Time'] = data1.index * Speed_Time
  print(data1)
  data1['Conductance'] = data['Current'] / (G0 * v)
  print(data1)
  </code></pre>
  <p>But it cannot divide a number, the error is:</p>
  <pre><code>Traceback (most recent call last):File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\ops\array_ops.py&quot;, line 142, in _na_arithmetic_opresult = expressions.evaluate(op, left, right)
  File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\computation\expressions.py&quot;, line 235, in evaluatereturn _evaluate(op, op_str, a, b)  # type: ignore[misc]
  File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\computation\expressions.py&quot;, line 69, in _evaluate_standardreturn op(a, b)
  TypeError: unsupported operand type(s) for /: 'str' and 'float'
          
  
  During handling of the above exception, another exception occurred:
          
  
  Traceback (most recent call last):
  
  File &quot;C:/Users/fq20881/OneDrive - University of Bristol/OneDrive/python code/Data Analysis/0 Data Analysis.py&quot;, line 32, in &lt;module&gt;
  
  data1['Conductance'] = data['Current'].div(G0 * v)
  
  File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\ops\__init__.py&quot;, line 177, in flex_wrapper
  
  return op(self, other)
  
  File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\ops\common.py&quot;, line 65, in new_method return method(self, other)
  File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\arraylike.py&quot;, line 113, in __truediv__return self._arith_method(other, operator.truediv)
  File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\series.py&quot;, line 4968, in _arith_method result = ops.arithmetic_op(lvalues, rvalues, op)
  File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\ops\array_ops.py&quot;, line 189, in arithmetic_opres_values = _na_arithmetic_op(lvalues, rvalues, op)
  File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\ops\array_ops.py&quot;, line 149, in _na_arithmetic_op result = _masked_arith_op(left, right, op)
  File &quot;C:\Users\fq20881\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\ops\array_ops.py&quot;, line 111, in _masked_arith_op result[mask] = op(xrav[mask], y)
  TypeError: unsupported operand type(s) for /: 'str' and 'float'
  </code></pre>