title: pandas.Series.unique() gives different result to np.unique() when analysing strings
body: <p>I have a method to voxelise a large dataset that creates a binary value (12 bytes) for all unique voxels, I can then take a subset using <code>df.isin()</code> to query. </p>
  
  <p>I was using the <code>pandas.Series.unique()</code> as an input to this query but was getting strange results so tried <code>np.unique()</code> and it worked. My question why do I get different results?</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import struct
  
  def voxel(tmp):
  
      binarize = lambda x: struct.pack('i', int((x * 100) / 5))
  
      tmp.loc[:, 'xb'] = tmp.x.apply(binarize)
      tmp.loc[:, 'yb'] = tmp.y.apply(binarize)
      tmp.loc[:, 'zb'] = tmp.z.apply(binarize)
      tmp.loc[:, 'B'] = tmp.xb + tmp.yb + tmp.zb
  
      return tmp
  
  X, Y, Z = np.meshgrid(np.arange(0, 100),
                        np.arange(0, 100),
                        np.arange(0, 100))
  
  grid = pd.DataFrame(data=np.vstack([X.flatten(), Y.flatten(), Z.flatten()]).T, 
                      columns=['x', 'y', 'z'])
  
  grid = voxel(grid)
  
  print 'numpy:', len(np.unique(grid.B)), 'pandas:', len(grid.B.unique())
  </code></pre>
  
  <p>Which produces</p>
  
  <pre><code>numpy:100000 pandas:99
  </code></pre>
  
  <p>I have tested this using Pandas 0.23.0 with Python 2.7.14 on RHEL 7.5.1804 and on my MacBook</p>