title: Pandas read_csv dtype inference on file with many int columns, except index and columns are string
body: <p>I need to load a big .csv file (with something like 10 million records) for my recommender I am building. My input file looks like this (with k near ~400 columns):</p>
  <pre><code>      P1    P2    ... Pk
  
  a      1     1    ...  0
  b      0     0    ...  0
  c      0     0    ...  1
  </code></pre>
  <p>I try to read my file with this call:</p>
  <pre><code>pd.read_csv(url,header=0, sep=&quot;\t&quot;,index_col=0,encoding=&quot;utf-8&quot;)
  </code></pre>
  <p>When I read the file, Pandas <strong>incorrectly guesses that all the numbers in my data are floats</strong>. I want to force the data to be 'int' type in order to save memory in the loading process. I tried to use the option: <code>dtype=int</code>, but this issued an error:</p>
  <pre><code>ValueError: invalid literal for int() with base 10: 'a'
  </code></pre>
  <p>I guess that this is due to the fact that my index and columns are strings.</p>
  <p>I know that I could try to use a dictionary to specify the data types for the columns manually, but since I am building a recommender <strong>don't know the columns and the indexes of my files in advance</strong>, and I want to avoid to re-create the dictionary each time a new file is lodaded.</p>
  <p>How can I specify to the <code>read_csv</code> method to <strong>set the integer type only on the data of my table, and not for the index and the column names?</strong></p>