title: Pandas pivot table breaking due to segmentation fault 11
body: <p>I'm trying to create a pivot table using pandas via the following script.</p>
  
  <pre><code>def analyzefile(file):
          a = pd.read_csv(file,header=None,names=labels,engine='python')
          df = pd.pivot_table(a,index=["STATE_SENATE_DISTRICT"], aggfunc='count',chunksize=300000)
          writer = pd.ExcelWriter('zipBreakout.xlsx')
          df.to_excel(writer, 'Sheet1')
          writer.save()
  
  analyzefile('FilteredDistricts.csv')
  </code></pre>
  
  <p>This code returns <code>Segmentation fault: 11</code>. It should be noted that the data set that I'm working with is quite large ~1.3 million entries. Is there a way to chunk the data so this doesn't happen? Another solution?</p>