<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="from io import StringIO
import pandas as pd

csv = 'Index,Date\n1,2013-01-01 23:00:00\n2,\n3,2013-01-01 23:00:01'
df = pd.read_csv(StringIO(csv), index_col=0, parse_dates=[1])
pd.qcut(df[&quot;Date&quot;], 2)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">io</span> <span class="pl-k">import</span> <span class="pl-v">StringIO</span>
<span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>

<span class="pl-s1">csv</span> <span class="pl-c1">=</span> <span class="pl-s">'Index,Date<span class="pl-cce">\n</span>1,2013-01-01 23:00:00<span class="pl-cce">\n</span>2,<span class="pl-cce">\n</span>3,2013-01-01 23:00:01'</span>
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-v">StringIO</span>(<span class="pl-s1">csv</span>), <span class="pl-s1">index_col</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">parse_dates</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>])
<span class="pl-s1">pd</span>.<span class="pl-en">qcut</span>(<span class="pl-s1">df</span>[<span class="pl-s">"Date"</span>], <span class="pl-c1">2</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto"><code class="notranslate">qcut</code> raises a <code class="notranslate">ValueError</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;mve.py&quot;, line 26, in &lt;module&gt;
    pd.qcut(df[&quot;Date&quot;], 2)
  File &quot;/tmp/test/env/lib/python3.5/site-packages/pandas/core/reshape/tile.py&quot;, line 208, in qcut
    dtype=dtype, duplicates=duplicates)
  File &quot;/tmp/test/env/lib/python3.5/site-packages/pandas/core/reshape/tile.py&quot;, line 251, in _bins_to_cuts
    dtype=dtype)
  File &quot;/tmp/test/env/lib/python3.5/site-packages/pandas/core/reshape/tile.py&quot;, line 344, in _format_labels
    labels = IntervalIndex.from_breaks(breaks, closed=closed)
  File &quot;/tmp/test/env/lib/python3.5/site-packages/pandas/core/indexes/interval.py&quot;, line 370, in from_breaks
    name=name, copy=copy)
  File &quot;/tmp/test/env/lib/python3.5/site-packages/pandas/core/indexes/interval.py&quot;, line 411, in from_arrays
    copy=copy, verify_integrity=True)
  File &quot;/tmp/test/env/lib/python3.5/site-packages/pandas/core/indexes/interval.py&quot;, line 225, in _simple_new
    result._validate()
  File &quot;/tmp/test/env/lib/python3.5/site-packages/pandas/core/indexes/interval.py&quot;, line 265, in _validate
    raise ValueError('missing values must be missing in the same '
ValueError: missing values must be missing in the same location both left and right sides"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "mve.py", line 26, in &lt;module&gt;
    pd.qcut(df["Date"], 2)
  File "/tmp/test/env/lib/python3.5/site-packages/pandas/core/reshape/tile.py", line 208, in qcut
    dtype=dtype, duplicates=duplicates)
  File "/tmp/test/env/lib/python3.5/site-packages/pandas/core/reshape/tile.py", line 251, in _bins_to_cuts
    dtype=dtype)
  File "/tmp/test/env/lib/python3.5/site-packages/pandas/core/reshape/tile.py", line 344, in _format_labels
    labels = IntervalIndex.from_breaks(breaks, closed=closed)
  File "/tmp/test/env/lib/python3.5/site-packages/pandas/core/indexes/interval.py", line 370, in from_breaks
    name=name, copy=copy)
  File "/tmp/test/env/lib/python3.5/site-packages/pandas/core/indexes/interval.py", line 411, in from_arrays
    copy=copy, verify_integrity=True)
  File "/tmp/test/env/lib/python3.5/site-packages/pandas/core/indexes/interval.py", line 225, in _simple_new
    result._validate()
  File "/tmp/test/env/lib/python3.5/site-packages/pandas/core/indexes/interval.py", line 265, in _validate
    raise ValueError('missing values must be missing in the same '
ValueError: missing values must be missing in the same location both left and right sides
</code></pre></div>
<h4 dir="auto">Expected Output</h4>
<p dir="auto"><code class="notranslate">qcut</code> returning something like</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Index
1    (2013-01-01 22:59:59.999999999, 2013-01-01 23:00:01.0
2    NaT
3    (2013-01-01 22:59:59.999999999, 2013-01-01 23:00:01.0"><pre class="notranslate"><code class="notranslate">Index
1    (2013-01-01 22:59:59.999999999, 2013-01-01 23:00:01.0
2    NaT
3    (2013-01-01 22:59:59.999999999, 2013-01-01 23:00:01.0
</code></pre></div>
<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.2.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.13.0-32-generic<br>
machine: x86_64<br>
processor: x86_64<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: de_DE.UTF-8<br>
LOCALE: de_DE.UTF-8</p>
<p dir="auto">pandas: 0.22.0<br>
pytest: None<br>
pip: 9.0.1<br>
setuptools: 38.5.1<br>
Cython: None<br>
numpy: 1.14.0<br>
scipy: None<br>
pyarrow: None<br>
xarray: None<br>
IPython: None<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.6.1<br>
pytz: 2018.3<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
feather: None<br>
matplotlib: None<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: None<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: None<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<p dir="auto">eemeter sample</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Your code here
Going to analyze the sample data set

Running a meter for ABC NATURAL_GAS_CONSUMPTION_SUPPLIED
c:\users\wtran\appdata\local\continuum\anaconda3\lib\site-packages\eemeter\modeling\models\caltrack_daily.py:80: RuntimeWarning: invalid value encountered in maximum
  np.maximum(df.tempF - bp, 0),
c:\users\wtran\appdata\local\continuum\anaconda3\lib\site-packages\eemeter\modeling\models\caltrack_daily.py:84: RuntimeWarning: invalid value encountered in maximum
  np.maximum(bp - df.tempF, 0),
Failed computing derivative (series=Best-fit cooling coefficient, baseline period)
Failed computing derivative (series=Best-fit cooling coefficient, reporting period)
Normal year savings estimate:
  1217.526961
  68% confidence interval: (1164.475562, 1270.578359)
Reporting period savings estimate:
  1169.700996
  68% confidence interval: (1116.730092, 1222.671900)

Running a meter for ABC ELECTRICITY_CONSUMPTION_SUPPLIED
Normal year savings estimate:
  10465.511272
  68% confidence interval: (10297.508645, 10633.513899)
Reporting period savings estimate:
  10393.837948
  68% confidence interval: (10226.081027, 10561.594870)
"><pre class="notranslate"><span class="pl-c"># Your code here</span>
<span class="pl-v">Going</span> <span class="pl-s1">to</span> <span class="pl-s1">analyze</span> <span class="pl-s1">the</span> <span class="pl-s1">sample</span> <span class="pl-s1">data</span> <span class="pl-s1">set</span>

<span class="pl-v">Running</span> <span class="pl-s1">a</span> <span class="pl-s1">meter</span> <span class="pl-k">for</span> <span class="pl-v">ABC</span> <span class="pl-v">NATURAL_GAS_CONSUMPTION_SUPPLIED</span>
<span class="pl-s1">c</span>:\u<span class="pl-s1">sers</span>\w<span class="pl-s1">tran</span>\a<span class="pl-s1">ppdata</span>\l<span class="pl-s1">ocal</span>\c<span class="pl-s1">ontinuum</span>\a<span class="pl-s1">naconda3</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\e<span class="pl-s1">emeter</span>\m<span class="pl-s1">odeling</span>\m<span class="pl-s1">odels</span>\c<span class="pl-s1">altrack_daily</span>.<span class="pl-s1">py</span>:<span class="pl-c1">80</span>: <span class="pl-v">RuntimeWarning</span>: <span class="pl-s1">invalid</span> <span class="pl-s1">value</span> <span class="pl-s1">encountered</span> <span class="pl-c1">in</span> <span class="pl-s1">maximum</span>
  <span class="pl-s1">np</span>.<span class="pl-en">maximum</span>(<span class="pl-s1">df</span>.<span class="pl-s1">tempF</span> <span class="pl-c1">-</span> <span class="pl-s1">bp</span>, <span class="pl-c1">0</span>),
<span class="pl-s1">c</span>:\u<span class="pl-s1">sers</span>\w<span class="pl-s1">tran</span>\a<span class="pl-s1">ppdata</span>\l<span class="pl-s1">ocal</span>\c<span class="pl-s1">ontinuum</span>\a<span class="pl-s1">naconda3</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\e<span class="pl-s1">emeter</span>\m<span class="pl-s1">odeling</span>\m<span class="pl-s1">odels</span>\c<span class="pl-s1">altrack_daily</span>.<span class="pl-s1">py</span>:<span class="pl-c1">84</span>: <span class="pl-v">RuntimeWarning</span>: <span class="pl-s1">invalid</span> <span class="pl-s1">value</span> <span class="pl-s1">encountered</span> <span class="pl-c1">in</span> <span class="pl-s1">maximum</span>
  <span class="pl-s1">np</span>.<span class="pl-en">maximum</span>(<span class="pl-s1">bp</span> <span class="pl-c1">-</span> <span class="pl-s1">df</span>.<span class="pl-s1">tempF</span>, <span class="pl-c1">0</span>),
<span class="pl-v">Failed</span> <span class="pl-s1">computing</span> <span class="pl-en">derivative</span> (<span class="pl-s1">series</span><span class="pl-c1">=</span><span class="pl-v">Best</span><span class="pl-c1">-</span><span class="pl-s1">fit</span> <span class="pl-s1">cooling</span> <span class="pl-s1">coefficient</span>, <span class="pl-s1">baseline</span> <span class="pl-s1">period</span>)
<span class="pl-v">Failed</span> <span class="pl-s1">computing</span> <span class="pl-en">derivative</span> (<span class="pl-s1">series</span><span class="pl-c1">=</span><span class="pl-v">Best</span><span class="pl-c1">-</span><span class="pl-s1">fit</span> <span class="pl-s1">cooling</span> <span class="pl-s1">coefficient</span>, <span class="pl-s1">reporting</span> <span class="pl-s1">period</span>)
<span class="pl-v">Normal</span> <span class="pl-s1">year</span> <span class="pl-s1">savings</span> <span class="pl-s1">estimate</span>:
  <span class="pl-c1">1217.526961</span>
  <span class="pl-c1">68</span><span class="pl-c1">%</span> <span class="pl-en">confidence</span> <span class="pl-s1">interval</span>: (<span class="pl-c1">1164.475562</span>, <span class="pl-c1">1270.578359</span>)
<span class="pl-v">Reporting</span> <span class="pl-s1">period</span> <span class="pl-s1">savings</span> <span class="pl-s1">estimate</span>:
  <span class="pl-c1">1169.700996</span>
  <span class="pl-c1">68</span><span class="pl-c1">%</span> <span class="pl-en">confidence</span> <span class="pl-s1">interval</span>: (<span class="pl-c1">1116.730092</span>, <span class="pl-c1">1222.671900</span>)

<span class="pl-v">Running</span> <span class="pl-s1">a</span> <span class="pl-s1">meter</span> <span class="pl-k">for</span> <span class="pl-v">ABC</span> <span class="pl-v">ELECTRICITY_CONSUMPTION_SUPPLIED</span>
<span class="pl-v">Normal</span> <span class="pl-s1">year</span> <span class="pl-s1">savings</span> <span class="pl-s1">estimate</span>:
  <span class="pl-c1">10465.511272</span>
  <span class="pl-c1">68</span><span class="pl-c1">%</span> <span class="pl-en">confidence</span> <span class="pl-s1">interval</span>: (<span class="pl-c1">10297.508645</span>, <span class="pl-c1">10633.513899</span>)
<span class="pl-v">Reporting</span> <span class="pl-s1">period</span> <span class="pl-s1">savings</span> <span class="pl-s1">estimate</span>:
  <span class="pl-c1">10393.837948</span>
  <span class="pl-c1">68</span><span class="pl-c1">%</span> <span class="pl-en">confidence</span> <span class="pl-s1">interval</span>: (<span class="pl-c1">10226.081027</span>, <span class="pl-c1">10561.594870</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">I installed Anaconda and am using the Anaconda Prompt to try to run the sample data.<br>
There are error messages appeared below before the see the Normal year savings estimate for GAS Consumption. Is this normal or is there anything that I should be typed in the code before typing the eemeter sample code in the command line?</p>
<p dir="auto">c:\users\wtran\appdata\local\continuum\anaconda3\lib\site-packages\eemeter\modeling\models\caltrack_daily.py:80: RuntimeWarning: invalid value encountered in maximum<br>
np.maximum(df.tempF - bp, 0),<br>
c:\users\wtran\appdata\local\continuum\anaconda3\lib\site-packages\eemeter\modeling\models\caltrack_daily.py:84: RuntimeWarning: invalid value encountered in maximum<br>
np.maximum(bp - df.tempF, 0),<br>
Failed computing derivative (series=Best-fit cooling coefficient, baseline period)<br>
Failed computing derivative (series=Best-fit cooling coefficient, reporting period)</p>
<p dir="auto">Normal year savings estimate:<br>
1217.526961<br>
68% confidence interval: (1164.475562, 1270.578359)<br>
Reporting period savings estimate:<br>
1169.700996<br>
68% confidence interval: (1116.730092, 1222.671900)</p>
<p dir="auto">[this should explain <strong>why</strong> the current behaviour is a problem and why the expected output is a better solution.]</p>
<p dir="auto"><strong>Note</strong>: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!</p>
<p dir="auto"><strong>Note</strong>: Many problems can be resolved by simply upgrading <code class="notranslate">pandas</code> to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if <code class="notranslate">master</code> addresses this issue, but that is not necessary.</p>
<p dir="auto">For documentation-related issues, you can check the latest versions of the docs on <code class="notranslate">master</code> here:</p>
<p dir="auto"><a href="https://pandas-docs.github.io/pandas-docs-travis/" rel="nofollow">https://pandas-docs.github.io/pandas-docs-travis/</a></p>
<p dir="auto">If the issue has not been resolved there, go ahead and file it in the issue tracker.</p>
<h4 dir="auto">Expected Output</h4>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<p dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]</p>
</details>