<p dir="auto">xref comment in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="296639568" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/19673" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/19673/hovercard" href="https://github.com/pandas-dev/pandas/pull/19673">#19673</a>, we don't have any ASV benchmarks in <code class="notranslate">groupby.GroupByMethods</code> to measure performance on datetimelike types (timestamp / timedelta)</p>
<p dir="auto">Hello,</p>
<p dir="auto">Series doesn't have is a <code class="notranslate">is_unique</code> attribute</p>
<p dir="auto">Index have a <code class="notranslate">is_unique</code> attribute but not (values of a) Series</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; df.index.is_unique
True

&gt;&gt;&gt; df['Column1'].is_unique
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
&lt;ipython-input-417-c450d4c4ceda&gt; in &lt;module&gt;()
----&gt; 1 df['Date'].is_unique

//anaconda/envs/py27/lib/python2.7/site-packages/pandas/core/generic.pyc in __getattr__(self, name)
   2358                 return self[name]
   2359             raise AttributeError(&quot;'%s' object has no attribute '%s'&quot; %
-&gt; 2360                                  (type(self).__name__, name))
   2361
   2362     def __setattr__(self, name, value):

AttributeError: 'Series' object has no attribute 'is_unique'"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>.<span class="pl-s1">index</span>.<span class="pl-s1">is_unique</span>
<span class="pl-c1">True</span>

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>[<span class="pl-s">'Column1'</span>].<span class="pl-s1">is_unique</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">AttributeError</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">417</span><span class="pl-c1">-</span><span class="pl-s1">c450d4c4ceda</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">-</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">1</span> <span class="pl-s1">df</span>[<span class="pl-s">'Date'</span>].<span class="pl-s1">is_unique</span>

<span class="pl-c1">//</span><span class="pl-s1">anaconda</span><span class="pl-c1">/</span><span class="pl-s1">envs</span><span class="pl-c1">/</span><span class="pl-s1">py27</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">generic</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">__getattr__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">name</span>)
   <span class="pl-c1">2358</span>                 <span class="pl-k">return</span> <span class="pl-s1">self</span>[<span class="pl-s1">name</span>]
   <span class="pl-c1">2359</span>             <span class="pl-k">raise</span> <span class="pl-v">AttributeError</span>(<span class="pl-s">"'%s' object has no attribute '%s'"</span> <span class="pl-c1">%</span>
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2360</span>                                  (<span class="pl-en">type</span>(<span class="pl-s1">self</span>).<span class="pl-s1">__name__</span>, <span class="pl-s1">name</span>))
   <span class="pl-c1">2361</span>
   <span class="pl-c1">2362</span>     <span class="pl-k">def</span> <span class="pl-en">__setattr__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">name</span>, <span class="pl-s1">value</span>):

<span class="pl-v">AttributeError</span>: <span class="pl-s">'Series'</span> <span class="pl-s1">object</span> <span class="pl-s1">has</span> <span class="pl-s1">no</span> <span class="pl-s1">attribute</span> <span class="pl-s">'is_unique'</span></pre></div>
<p dir="auto">I'm doing this</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def is_unique(ser):
    return len(np.unique(ser.values)) == len(ser.values)"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">is_unique</span>(<span class="pl-s1">ser</span>):
    <span class="pl-k">return</span> <span class="pl-en">len</span>(<span class="pl-s1">np</span>.<span class="pl-en">unique</span>(<span class="pl-s1">ser</span>.<span class="pl-s1">values</span>)) <span class="pl-c1">==</span> <span class="pl-en">len</span>(<span class="pl-s1">ser</span>.<span class="pl-s1">values</span>)</pre></div>
<p dir="auto">but this kind of attribute could be useful when you want to set a column as index and ensure that there is no duplicate keys.</p>
<p dir="auto">PS: I know there is</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    df.set_index('Column1', verify_integrity=True)"><pre class="notranslate">    <span class="pl-s1">df</span>.<span class="pl-en">set_index</span>(<span class="pl-s">'Column1'</span>, <span class="pl-s1">verify_integrity</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</pre></div>