title: Determine whether in two rows one is a header or not
body: <p>I am trying to do a task that is quite simple to do by a human: detect whether the first of two rows is a header row. Here's an example of sample inputs:</p>
  
  <p>Example1: yes</p>
  
  <pre><code>name,age
  bob,12
  </code></pre>
  
  <p>Example2: yes</p>
  
  <pre><code>first,last
  bob,jones
  </code></pre>
  
  <p>Example3: no</p>
  
  <pre><code>1,2
  8,hi
  </code></pre>
  
  <p>Example4: no</p>
  
  <pre><code>bob,jones
  tom,smith
  </code></pre>
  
  <p>I'm a bit lost of where to begin to make an educated guess here. It doesn't have to be perfect (80% would be good), but what might be a good short-hand algorithm to determine the above? Some things I was thinking of:</p>
  
  <pre><code># header is usually always strings (wrong in case 4)
  for val in header:
  
      is val.replace(',','').replace('.','').replace('-','').isdigit():
          header = False
      else:
          header = True
  </code></pre>