Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
AmbiguousTimeError on groupby when including a DST change #14682
Comments
|
xref #10668 (though this looks separate). yeah, prob need to specify |
jreback
added Bug Difficulty Advanced Effort Low Groupby Timezones
labels
Nov 17, 2016
jreback
added this to the
Next Major Release
milestone
Nov 17, 2016
j-santander
commented
Nov 17, 2016
|
I've been trying to debug the above issue. Tried adding the ambiguous keyword to the constructor of the Timestamps... but I wasn't sure how to set it (as The code raising the exception seems to have been modified with commit dcc68d7 where the I've modified the code to not do that... but then I had to modify an assert at pandas.tseries.index.py that it is checking for equality of time zones... but it turns that Europe/Madrid on DST is considered different from Europe/Madrid not on DST. I'll try to create a pull request with my changes so that you can comment. |
j-santander
referenced
this issue
Nov 17, 2016
Closed
BUG: Avoid AmbiguousTimeError on groupby #14683
jreback
modified the milestone: 0.19.2, Next Major Release
Nov 21, 2016
jreback
closed this
in 9f2e453
Nov 22, 2016
amolkahat
added a commit
to amolkahat/pandas
that referenced
this issue
Nov 26, 2016
|
|
+ amolkahat |
0e9fbc0
|
jorisvandenbossche
added a commit
to jorisvandenbossche/pandas
that referenced
this issue
Dec 14, 2016
|
|
+ jorisvandenbossche |
fcd996a
|
j-santander commentedNov 17, 2016
A small, complete example of the issue
Expected Output
Output of
pd.show_versions()INSTALLED VERSIONS
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-47-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.19.1
nose: 1.3.7
pip: 9.0.1
setuptools: 28.6.1
Cython: 0.25.1
numpy: 1.11.2
scipy: None
statsmodels: None
xarray: None
IPython: None
sphinx: 1.4.8
patsy: None
dateutil: 2.4.2
pytz: 2016.7
blosc: None
bottleneck: None
tables: None
numexpr: 2.6.1
matplotlib: None
openpyxl: 2.2.6
xlrd: None
xlwt: None
xlsxwriter: None
lxml: 3.5.0
bs4: 4.4.1
html5lib: 0.999
httplib2: 0.9.1
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None
The above code raises an
AmbiguousTimeErrorexception, when grouping by a time-date series including a DST change. In the above example the unix timestamps are for the recent DST change in Europe.The stack trace is:
Code works if the series does not include a DST change (e.g. one day earlier):
gets: