title: Read txt file with string and number columns
body: <p>I have tab-separated file (city-data.txt):</p>
  
  <pre><code>Alabama Montgomery  32.361538   -86.279118
  Alaska  Juneau  58.301935   -134.41974
  </code></pre>
  
  <p>Is it possible to read somehow first two columns as strings and last two as floats?</p>
  
  <p>My output should look like this:</p>
  
  <pre><code>[(Alabama,Montgomery,32.36,-86.28),
   (Alaska,Juneau,58.30,-134.42)]
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>mylist2=np.genfromtxt(r'city-data.txt', delimiter='\t',  dtype=("&lt;S15","
  &lt;S15", float, float)).tolist()
  </code></pre>
  
  <p>Which gives me first two columns in byte type:</p>
  
  <pre><code>[(b'Alabama', b'Montgomery', 32.361538, -86.279118),
   (b'Alaska', b'Juneau', 58.301935, -134.41974)]
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>with open('city-data.txt') as f:
  mylist = [tuple(i.strip().split('\t')) for i in f]
  </code></pre>
  
  <p>Which gives me all columns in string type:</p>
  
  <pre><code>[('Alabama', 'Montgomery', '32.361538', '-86.279118'),
   ('Alaska', 'Juneau', '58.301935', '-134.41974')]
  </code></pre>
  
  <p>I can't come up with any idea how to implement what I need...</p>