title: In Pandas crosstab operation, setting both colnames=[None] and margins=True causes error
body: <p>I have a simple pandas dataframe consisting of a couple of categorical variables. This can be simplified as follows:</p>
  
  <pre><code>tempDF = pd.DataFrame({ 'species': ["cat","dog","dog","dog","cat","cat","cat","dog","cat","cat"],
                          'gender':  ["female","female","female","male","male","female","female","female","male","female"]})
  
  print(tempDF)
  
         gender species
      0  female     cat
      1  female     dog
      2  female     dog
      3    male     dog
      4    male     cat
      5  female     cat
      6  female     cat
      7  female     dog
      8    male     cat
      9  female     cat
  </code></pre>
  
  <p>I can create a simple cross-tabulation as follows:</p>
  
  <pre><code>tempTable = pd.crosstab(tempDF['species'],tempDF['gender'])
  
  gender   female  male
  species              
  cat           4     2
  dog           3     1
  </code></pre>
  
  <p>However, I want species to be a variable in a column rather than the index so I can reset the index: </p>
  
  <pre><code>tempTable = tempTable.reset_index(drop=False)
  
  gender species  female  male
  0          cat       4     2
  1          dog       3     1
  </code></pre>
  
  <p>But now it seems that the index is labelled 'gender' which is confusing as 'male' and 'female' are already the heading for each column. In fact, the term 'gender' actually seems to be the name of the column headings and it can be set to anything, including None:</p>
  
  <pre><code>tempTable.columns.name = None
  
    species  female  male
  0     cat       4     2
  1     dog       3     1
  </code></pre>
  
  <p>Which is exactly what I want.</p>
  
  <p>In fact, this can be done more efficiently at the initial crosstab stage:</p>
  
  <pre><code>tempTable = pd.crosstab(tempDF['species'],tempDF['gender'],colnames=[None])
  
           female  male
  species              
  cat           4     2
  dog           3     1
  </code></pre>
  
  <p>(N.B. It seems that None needs to be passed as a list in square brackets to have any impact. But anyway.)</p>
  
  <p>The problem occurs if I also want to include margins in the cross-tabulation:</p>
  
  <pre><code>tempTable = pd.crosstab(tempDF['species'],tempDF['gender'],colnames=[None],margins=True)
  </code></pre>
  
  <p>This time, I get:</p>
  
  <pre><code>KeyError: 'Level None not found'
  </code></pre>
  
  <p>Including colnames=[None] or margins=True is fine. But why should including margins=True interact with colnames=[None] to produce an error? Is there any way to set column name to None and include margins in the same command? Or do I have to go through all the individual steps outlined above?</p>