title: pandas memory error on large RAM machine but not on smaller RAM machine: same code, same data
body: <p>I run the following on two of my machines:</p>
  
  <pre class="lang-python prettyprint-override"><code>import os, sqlite3
  import pandas as pd
  from feat_transform import filter_anevexp
  db_path = r'C:\Users\timregan\Desktop\anondb_280718.sqlite3'
  db = sqlite3.connect(db_path)
  anevexp_df = filter_anevexp(db, 0)
  </code></pre>
  
  <p>On my laptop (with 8GB of RAM) this runs without issue (although the call out to <code>filter_anevexp</code> takes a few minutes). On my desktop (with 128GB of RAM) it fails in pandas with a memory error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Users\timregan\source\MentalHealth\code\preprocessing\feat_transform.py", line 171, in filter_anevexp
      anevexp_df = anevexp_df[anevexp_df["user_id"].isin(df)].copy()
    File "C:\Users\timregan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\frame.py", line 2682, in __getitem__
      return self._getitem_array(key)
    File "C:\Users\timregan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\frame.py", line 2724, in _getitem_array
      return self._take(indexer, axis=0)
    File "C:\Users\timregan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\generic.py", line 2789, in _take
      verify=True)
    File "C:\Users\timregan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\internals.py", line 4539, in take
      axis=axis, allow_dups=True)
    File "C:\Users\timregan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\internals.py", line 4425, in reindex_indexer
      for blk in self.blocks]
    File "C:\Users\timregan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\internals.py", line 4425, in &lt;listcomp&gt;
      for blk in self.blocks]
    File "C:\Users\timregan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\internals.py", line 1258, in take_nd
      allow_fill=True, fill_value=fill_value)
    File "C:\Users\timregan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\algorithms.py", line 1655, in take_nd
      out = np.empty(out_shape, dtype=dtype)
  MemoryError
  </code></pre>
  
  <p>Is there anything special I need to do to prevent errors (e.g. addressing errors) on machines with lots of memory?</p>
  
  <p>N.B. I have not included the code in the <code>filter_anevexp</code> function because I am not interested in advice on how to reduce its memory footprint. I am interested in understanding why the same code running on the same data fails with a memory error on a 128GB RAM machine while it succeeds on a 8GB RAM machine?</p>