<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="284912806" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/18968" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/18968/hovercard" href="https://github.com/pandas-dev/pandas/pull/18968">#18968</a></p>
<p dir="auto">sets up a really basic structure. ideally split out tests from tests_series and test_frame, in a similar<br>
manner to how we do <code class="notranslate">pandas/tests/frame</code> and <code class="notranslate">pandas/tests/series</code>.</p>
<p dir="auto">I have a dataframe that contains a datetime64 column that seems to be losing some digits after a groupby.first(). I know that under the hood these are stored at nanosecond precision, but I need them to remain equal, since I'm merging back onto the original frame later on. Is this expected behavior?</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
from pandas import Timestamp

data = [
 {'a': 1,
  'dateCreated': Timestamp('2011-01-20 12:50:28.593448')},
 {'a': 1,
  'dateCreated': Timestamp('2011-01-15 12:50:28.502376')},
 {'a': 1,
  'dateCreated': Timestamp('2011-01-15 12:50:28.472790')},
 {'a': 1,
  'dateCreated': Timestamp('2011-01-15 12:50:28.445286')}]

df = pd.DataFrame(data)"><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>
<span class="pl-k">from</span> <span class="pl-s1">pandas</span> <span class="pl-k">import</span> <span class="pl-v">Timestamp</span>

<span class="pl-s1">data</span> <span class="pl-c1">=</span> [
 {<span class="pl-s">'a'</span>: <span class="pl-c1">1</span>,
  <span class="pl-s">'dateCreated'</span>: <span class="pl-v">Timestamp</span>(<span class="pl-s">'2011-01-20 12:50:28.593448'</span>)},
 {<span class="pl-s">'a'</span>: <span class="pl-c1">1</span>,
  <span class="pl-s">'dateCreated'</span>: <span class="pl-v">Timestamp</span>(<span class="pl-s">'2011-01-15 12:50:28.502376'</span>)},
 {<span class="pl-s">'a'</span>: <span class="pl-c1">1</span>,
  <span class="pl-s">'dateCreated'</span>: <span class="pl-v">Timestamp</span>(<span class="pl-s">'2011-01-15 12:50:28.472790'</span>)},
 {<span class="pl-s">'a'</span>: <span class="pl-c1">1</span>,
  <span class="pl-s">'dateCreated'</span>: <span class="pl-v">Timestamp</span>(<span class="pl-s">'2011-01-15 12:50:28.445286'</span>)}]

<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-s1">data</span>)</pre></div>
<p dir="auto">Output is:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [6]: df
Out[6]:
   a                dateCreated
0  1 2011-01-20 12:50:28.593448
1  1 2011-01-15 12:50:28.502376
2  1 2011-01-15 12:50:28.472790
3  1 2011-01-15 12:50:28.445286

In [7]: df.groupby('a').first()
Out[7]:
                    dateCreated
a
1 2011-01-20 12:50:28.593447936"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">df</span>
<span class="pl-v">Out</span>[<span class="pl-c1">6</span>]:
   <span class="pl-s1">a</span>                <span class="pl-s1">dateCreated</span>
<span class="pl-c1">0</span>  <span class="pl-c1">1</span> <span class="pl-c1">2011</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">20</span> <span class="pl-c1">12</span>:<span class="pl-c1">50</span>:<span class="pl-c1">28.593448</span>
<span class="pl-c1">1</span>  <span class="pl-c1">1</span> <span class="pl-c1">2011</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">15</span> <span class="pl-c1">12</span>:<span class="pl-c1">50</span>:<span class="pl-c1">28.502376</span>
<span class="pl-c1">2</span>  <span class="pl-c1">1</span> <span class="pl-c1">2011</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">15</span> <span class="pl-c1">12</span>:<span class="pl-c1">50</span>:<span class="pl-c1">28.472790</span>
<span class="pl-c1">3</span>  <span class="pl-c1">1</span> <span class="pl-c1">2011</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">15</span> <span class="pl-c1">12</span>:<span class="pl-c1">50</span>:<span class="pl-c1">28.445286</span>

<span class="pl-v">In</span> [<span class="pl-c1">7</span>]: <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s">'a'</span>).<span class="pl-en">first</span>()
<span class="pl-v">Out</span>[<span class="pl-c1">7</span>]:
                    <span class="pl-s1">dateCreated</span>
<span class="pl-s1">a</span>
<span class="pl-c1">1</span> <span class="pl-c1">2011</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">20</span> <span class="pl-c1">12</span>:<span class="pl-c1">50</span>:<span class="pl-c1">28.593447936</span></pre></div>
<p dir="auto">When I compare the datetime64 in the first row to the datetime64 after the groupby.first(), the two are not equal.</p>