<h4 dir="auto">When value_counts on different list value, it's ok:</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ser1 = pd.Series([[1], [2], [2]])
ser1.value_counts()

[2]    2
[1]    1
dtype: int64"><pre class="notranslate"><span class="pl-s1">ser1</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([[<span class="pl-c1">1</span>], [<span class="pl-c1">2</span>], [<span class="pl-c1">2</span>]])
<span class="pl-s1">ser1</span>.<span class="pl-en">value_counts</span>()

[<span class="pl-c1">2</span>]    <span class="pl-c1">2</span>
[<span class="pl-c1">1</span>]    <span class="pl-c1">1</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span></pre></div>
<h4 dir="auto">But, when value_counts on unique list value, it's failed:</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ser2 = pd.Series([[1], [1], [1]])
ser2.value_counts()

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-64-845402fb8b57&gt; in &lt;module&gt;()
      1 ser2 = pd.Series([[1], [1], [1]])
----&gt; 2 ser2.value_counts()

/home/centos/anaconda2/lib/python2.7/site-packages/pandas/core/base.pyc in value_counts(self, normalize, sort, ascending, bins, dropna)
    945         from pandas.core.algorithms import value_counts
    946         result = value_counts(self, sort=sort, ascending=ascending,
--&gt; 947                               normalize=normalize, bins=bins, dropna=dropna)
    948         return result
    949 

/home/centos/anaconda2/lib/python2.7/site-packages/pandas/core/algorithms.pyc in value_counts(values, sort, ascending, normalize, bins, dropna)
    276     else:
    277         # ndarray path. pass original to handle DatetimeTzBlock
--&gt; 278         keys, counts = _value_counts_arraylike(values, dropna=dropna)
    279 
    280         from pandas import Index, Series

/home/centos/anaconda2/lib/python2.7/site-packages/pandas/core/algorithms.pyc in _value_counts_arraylike(values, dropna)
    346         values = com._ensure_object(values)
    347         mask = com.isnull(values)
--&gt; 348         keys, counts = htable.value_count_object(values, mask)
    349         if not dropna and mask.any():
    350             keys = np.insert(keys, 0, np.NaN)

pandas/hashtable.pyx in pandas.hashtable.value_count_object (pandas/hashtable.c:18970)()

pandas/hashtable.pyx in pandas.hashtable.value_count_object (pandas/hashtable.c:18705)()

TypeError: unhashable type: 'list'"><pre class="notranslate"><span class="pl-s1">ser2</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([[<span class="pl-c1">1</span>], [<span class="pl-c1">1</span>], [<span class="pl-c1">1</span>]])
<span class="pl-s1">ser2</span>.<span class="pl-en">value_counts</span>()

<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">TypeError</span>                                 <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">64</span><span class="pl-c1">-</span><span class="pl-c1">845402</span><span class="pl-s1">fb8b57</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>()
      <span class="pl-c1">1</span> <span class="pl-s1">ser2</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([[<span class="pl-c1">1</span>], [<span class="pl-c1">1</span>], [<span class="pl-c1">1</span>]])
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2</span> <span class="pl-s1">ser2</span>.<span class="pl-en">value_counts</span>()

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">centos</span><span class="pl-c1">/</span><span class="pl-s1">anaconda2</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">base</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">value_counts</span>(<span class="pl-s1">self</span>, <span class="pl-s1">normalize</span>, <span class="pl-s1">sort</span>, <span class="pl-s1">ascending</span>, <span class="pl-s1">bins</span>, <span class="pl-s1">dropna</span>)
    <span class="pl-c1">945</span>         <span class="pl-k">from</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">core</span>.<span class="pl-s1">algorithms</span> <span class="pl-k">import</span> <span class="pl-s1">value_counts</span>
    <span class="pl-c1">946</span>         <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-en">value_counts</span>(<span class="pl-s1">self</span>, <span class="pl-s1">sort</span><span class="pl-c1">=</span><span class="pl-s1">sort</span>, <span class="pl-s1">ascending</span><span class="pl-c1">=</span><span class="pl-s1">ascending</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">947</span>                               <span class="pl-s1">normalize</span><span class="pl-c1">=</span><span class="pl-s1">normalize</span>, <span class="pl-s1">bins</span><span class="pl-c1">=</span><span class="pl-s1">bins</span>, <span class="pl-s1">dropna</span><span class="pl-c1">=</span><span class="pl-s1">dropna</span>)
    <span class="pl-c1">948</span>         <span class="pl-k">return</span> <span class="pl-s1">result</span>
    <span class="pl-c1">949</span> 

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">centos</span><span class="pl-c1">/</span><span class="pl-s1">anaconda2</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">algorithms</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">value_counts</span>(<span class="pl-s1">values</span>, <span class="pl-s1">sort</span>, <span class="pl-s1">ascending</span>, <span class="pl-s1">normalize</span>, <span class="pl-s1">bins</span>, <span class="pl-s1">dropna</span>)
    <span class="pl-c1">276</span>     <span class="pl-s1">else</span>:
    <span class="pl-c1">277</span>         <span class="pl-c"># ndarray path. pass original to handle DatetimeTzBlock</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">278</span>         <span class="pl-s1">keys</span>, <span class="pl-s1">counts</span> <span class="pl-c1">=</span> <span class="pl-en">_value_counts_arraylike</span>(<span class="pl-s1">values</span>, <span class="pl-s1">dropna</span><span class="pl-c1">=</span><span class="pl-s1">dropna</span>)
    <span class="pl-c1">279</span> 
    <span class="pl-c1">280</span>         <span class="pl-k">from</span> <span class="pl-s1">pandas</span> <span class="pl-k">import</span> <span class="pl-v">Index</span>, <span class="pl-v">Series</span>

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">centos</span><span class="pl-c1">/</span><span class="pl-s1">anaconda2</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">algorithms</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">_value_counts_arraylike</span>(<span class="pl-s1">values</span>, <span class="pl-s1">dropna</span>)
    <span class="pl-c1">346</span>         <span class="pl-s1">values</span> <span class="pl-c1">=</span> <span class="pl-s1">com</span>.<span class="pl-en">_ensure_object</span>(<span class="pl-s1">values</span>)
    <span class="pl-c1">347</span>         <span class="pl-s1">mask</span> <span class="pl-c1">=</span> <span class="pl-s1">com</span>.<span class="pl-en">isnull</span>(<span class="pl-s1">values</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">348</span>         <span class="pl-s1">keys</span>, <span class="pl-s1">counts</span> <span class="pl-c1">=</span> <span class="pl-s1">htable</span>.<span class="pl-en">value_count_object</span>(<span class="pl-s1">values</span>, <span class="pl-s1">mask</span>)
    <span class="pl-c1">349</span>         <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">dropna</span> <span class="pl-c1">and</span> <span class="pl-s1">mask</span>.<span class="pl-en">any</span>():
    <span class="pl-c1">350</span>             <span class="pl-s1">keys</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">insert</span>(<span class="pl-s1">keys</span>, <span class="pl-c1">0</span>, <span class="pl-s1">np</span>.<span class="pl-v">NaN</span>)

<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">hashtable</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">hashtable</span>.<span class="pl-en">value_count_object</span> (<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">hashtable</span>.<span class="pl-s1">c</span>:<span class="pl-c1">18970</span>)()

<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">hashtable</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">hashtable</span>.<span class="pl-en">value_count_object</span> (<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">hashtable</span>.<span class="pl-s1">c</span>:<span class="pl-c1">18705</span>)()

<span class="pl-v">TypeError</span>: <span class="pl-s1">unhashable</span> <span class="pl-s1">type</span>: <span class="pl-s">'list'</span></pre></div>
<h4 dir="auto">I tried 1.18.1 and 1.19.0</h4>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code>, 1.18.1</h4>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 2.7.12.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 3.10.0-327.36.2.el7.x86_64<br>
machine: x86_64<br>
processor: x86_64<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: en_US.UTF-8</p>
<p dir="auto">pandas: 0.18.1<br>
nose: 1.3.7<br>
pip: 8.1.2<br>
setuptools: 27.2.0<br>
Cython: 0.24.1<br>
numpy: 1.11.1<br>
scipy: 0.18.1<br>
statsmodels: 0.6.1<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.4.6<br>
patsy: 0.4.1<br>
dateutil: 2.5.3<br>
pytz: 2016.6.1<br>
blosc: None<br>
bottleneck: 1.1.0<br>
tables: 3.2.3.1<br>
numexpr: 2.6.1<br>
matplotlib: 1.5.3<br>
openpyxl: 2.3.2<br>
xlrd: 1.0.0<br>
xlwt: 1.1.2<br>
xlsxwriter: 0.9.3<br>
lxml: 3.6.4<br>
bs4: 4.5.1<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.0.13<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.8<br>
boto: 2.42.0<br>
pandas_datareader: None</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code>, 1.19.0</h4>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 2.7.12.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.4.0-45-generic<br>
machine: x86_64<br>
processor: x86_64<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: None<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.19.0<br>
nose: 1.3.7<br>
pip: 8.1.2<br>
setuptools: 27.2.0<br>
Cython: 0.24.1<br>
numpy: 1.11.2<br>
scipy: 0.18.1<br>
statsmodels: 0.6.1<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.4.6<br>
patsy: 0.4.1<br>
dateutil: 2.5.3<br>
pytz: 2016.7<br>
blosc: None<br>
bottleneck: 1.1.0<br>
tables: 3.2.3.1<br>
numexpr: 2.6.1<br>
matplotlib: 1.5.3<br>
openpyxl: 2.3.2<br>
xlrd: 1.0.0<br>
xlwt: 1.1.2<br>
xlsxwriter: 0.9.3<br>
lxml: 3.6.4<br>
bs4: 4.5.1<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.0.13<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.8<br>
boto: 2.42.0<br>
pandas_datareader: None</p>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span></pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df = pd.DataFrame({'foo': [1.0001] * 5 + [0.]*5})"><pre class="notranslate"><span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'foo'</span>: [<span class="pl-c1">1.0001</span>] <span class="pl-c1">*</span> <span class="pl-c1">5</span> <span class="pl-c1">+</span> [<span class="pl-c1">0.</span>]<span class="pl-c1">*</span><span class="pl-c1">5</span>})</pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df"><pre class="notranslate"><span class="pl-s1">df</span></pre></div>
<div dir="auto">
<table border="1" role="table">
  <thead>
    <tr>
      <th></th>
      <th>foo</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>1.0001</td>
    </tr>
    <tr>
      <th>1</th>
      <td>1.0001</td>
    </tr>
    <tr>
      <th>2</th>
      <td>1.0001</td>
    </tr>
    <tr>
      <th>3</th>
      <td>1.0001</td>
    </tr>
    <tr>
      <th>4</th>
      <td>1.0001</td>
    </tr>
    <tr>
      <th>5</th>
      <td>0.0000</td>
    </tr>
    <tr>
      <th>6</th>
      <td>0.0000</td>
    </tr>
    <tr>
      <th>7</th>
      <td>0.0000</td>
    </tr>
    <tr>
      <th>8</th>
      <td>0.0000</td>
    </tr>
    <tr>
      <th>9</th>
      <td>0.0000</td>
    </tr>
  </tbody>
</table>
</div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df.rolling(2).sum()"><pre class="notranslate"><span class="pl-s1">df</span>.<span class="pl-en">rolling</span>(<span class="pl-c1">2</span>).<span class="pl-en">sum</span>()</pre></div>
<div dir="auto">
<table border="1" role="table">
  <thead>
    <tr>
      <th></th>
      <th>foo</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>NaN</td>
    </tr>
    <tr>
      <th>1</th>
      <td>2.000200e+00</td>
    </tr>
    <tr>
      <th>2</th>
      <td>2.000200e+00</td>
    </tr>
    <tr>
      <th>3</th>
      <td>2.000200e+00</td>
    </tr>
    <tr>
      <th>4</th>
      <td>2.000200e+00</td>
    </tr>
    <tr>
      <th>5</th>
      <td>1.000100e+00</td>
    </tr>
    <tr>
      <th>6</th>
      <td>4.440892e-16</td>
    </tr>
    <tr>
      <th>7</th>
      <td>4.440892e-16</td>
    </tr>
    <tr>
      <th>8</th>
      <td>4.440892e-16</td>
    </tr>
    <tr>
      <th>9</th>
      <td>4.440892e-16</td>
    </tr>
  </tbody>
</table>
</div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">Rolling sum of zeros sometimes gives a very small negative number, which is not the desired behavior.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.5.4.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.1.35-pv-ts2<br>
machine: x86_64<br>
processor:<br>
byteorder: little<br>
LC_ALL: en_US.utf8<br>
LANG: en_US.utf8<br>
LOCALE: en_US.UTF-8</p>
<p dir="auto">pandas: 0.20.3<br>
pytest: 3.2.1<br>
pip: 9.0.1<br>
setuptools: 36.4.0<br>
Cython: 0.26<br>
numpy: 1.12.1<br>
scipy: 0.19.1<br>
xarray: None<br>
IPython: 6.1.0<br>
sphinx: 1.6.3<br>
patsy: 0.4.1<br>
dateutil: 2.6.1<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: 3.4.2<br>
numexpr: 2.6.2<br>
feather: None<br>
matplotlib: 2.0.2<br>
openpyxl: 2.4.8<br>
xlrd: 1.1.0<br>
xlwt: None<br>
xlsxwriter: 0.9.8<br>
lxml: None<br>
bs4: 4.6.0<br>
html5lib: 0.9999999<br>
sqlalchemy: 1.1.13<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>