title: Loading data pickled in linux fails in mac
body: <p>I am saving a python dataset which contains a class, with referenced dictionaries and classes, on a Linux machine. The file loads normally on Windows or Linux, but on mac I get the following error if loading with the 'rb' modifier:</p>
  
  <pre><code>File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1378, in load
  return Unpickler(file).load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 858, in load
  dispatch[key](self)
  KeyError: '\x00'
  </code></pre>
  
  <p>And this error if loading with the 'rU' modifier:</p>
  
  <pre><code>File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1378, in load
  return Unpickler(file).load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 858, in load
  dispatch[key](self)
  KeyError: '\x06
  </code></pre>
  
  <p>Saving and loading were attempted with pickle, cPickle and dill, all with similar outcome.</p>
  
  <p><strong>Update:</strong>
  I am getting this exact error when saving in linux and loading in mac large pandas DataFrames:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  pd.DataFrame(np.random.randn(100000,5)).to_pickle("1.dat")
  </code></pre>
  
  <p>The error recurs when trying to open 1.dat im mac using this code:</p>
  
  <pre><code>pd.read_pickle("1.dat")
  </code></pre>