title: How to read a text file that stores an equation?
body: <p>I have a text file <strong>abc.txt</strong> with the following 3 different kinds of values, each of them has slightly different ways to stores the value of data:</p>
  <pre><code>A = 1.23 
  B  = 2.34E-002 cm
  C= 3.45E-002 cm  3.45E-004 m
  </code></pre>
  <p>I want to convert this text into a dataframe in python such that:</p>
  <pre><code>A        B        C(cm)      C(m)
  1.23     2.23e-2  3.45e-02    3.45e-04
  </code></pre>
  <p>I was able to read A by:</p>
  <pre><code>import pandas as pd
  import re
  df = pd.DataFrame()
  
  column_list = [&quot;A&quot;, &quot;B&quot;, &quot;C&quot; ]
  for line in open(&quot;abc.txt&quot;,&quot;r&quot;) :
      for column in column_list:
          if column in line:
              tmp_data =  float(re.findall(r'[\d]*[.][\d]+', line)[0])                        
              df[&quot;{}&quot;.format(column)] = tmp_data
  </code></pre>
  <p>When the line includes the exponent E-002 or situation with two numbers in one line, this method fails. Are there any efficient methods without using re?</p>