Skip to content

groupby TimeStamp bug #14186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
motamedi79 opened this issue Sep 8, 2016 · 1 comment
Closed

groupby TimeStamp bug #14186

motamedi79 opened this issue Sep 8, 2016 · 1 comment
Labels
Duplicate Report Duplicate issue or pull request Groupby Timezones Timezone data dtype

Comments

@motamedi79
Copy link

motamedi79 commented Sep 8, 2016

Code Sample, a copy-pastable example if possible

x = pd.DataFrame(index = [1,1,2,2,2], data = pd.date_range("7:00", "9:00", freq="30min", tz = 'US/Eastern'))

x:

1 2016-09-08 07:00:00-04:00
1 2016-09-08 07:30:00-04:00
2 2016-09-08 08:00:00-04:00
2 2016-09-08 08:30:00-04:00
2 2016-09-08 09:00:00-04:00

In [59]: x.groupby(level=0).first()
Out[59]: 
                          0
1 2016-09-08 11:00:00-04:00
2 2016-09-08 12:00:00-04:00

Expected Output

1 2016-09-08 07:00:00-04:00
2 2016-09-08 08:00:00-04:00
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-229.14.1.el7.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.17.1
nose: 1.3.7
pip: 8.1.2
setuptools: 23.0.0
Cython: 0.23.4
numpy: 1.10.2
scipy: 0.16.1
statsmodels: 0.6.1
IPython: 4.0.1
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.5.3
pytz: 2015.7
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.4.6
matplotlib: 1.5.1
openpyxl: 2.2.6
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.7.7
lxml: 3.4.4
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.9
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext)
Jinja2: None
@jreback
Copy link
Contributor

jreback commented Sep 8, 2016

this is a dupe of #10668

@jreback jreback closed this as completed Sep 8, 2016
@jreback jreback added Groupby Duplicate Report Duplicate issue or pull request Timezones Timezone data dtype labels Sep 8, 2016
@jreback jreback added this to the No action milestone Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request Groupby Timezones Timezone data dtype
Projects
None yet
Development

No branches or pull requests

2 participants