-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: tz-aware datetime with column-wise comparisions failing with np.minmum/maximum #15552
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
Comments
this is related to this: #15553 but that said, there is only so much that can be done when passing things directly to numpy arrays like this (its actually not the passing, but returning, some numpy functions are friendly and some are not). I suppose this could be made to work, below is a much more idiomatic way to do this. See the 2nd part for the actual issue. naive
doesn't raise, but incorrect results for tz-aware
|
and @adbull
this is not true at all, they naively look like they are working, but because of the same issue above (numpy has no clue about timezones, and forget about missing values), these are completely wrong (they are tz shifted incorrectly)
|
This work on master now. Could use a test as always. |
It looks like the |
This looks fixed on master again:
|
Code Sample, a copy-pastable example if possible
Problem description
When a tz-aware datetime is placed in a
Series
, the numpy operationsfmin
/fmax
/minimum
/maximum
throw an error, even though these operations work fine on a tz-awareDatetimeIndex
.Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.9.8-100.fc24.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: C
LANG: C
LOCALE: None.None
pandas: 0.19.2
nose: 1.3.7
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.11.3
scipy: 0.18.1
statsmodels: 0.8.0
xarray: 0.9.1
IPython: 4.2.0
sphinx: 1.5.1
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: 1.2.0
tables: 3.3.0
numexpr: 2.6.2
matplotlib: 2.0.0
openpyxl: 2.4.1
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml: 3.7.2
bs4: 4.5.3
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: 1.1.5
pymysql: None
psycopg2: None
jinja2: 2.9.4
boto: 2.45.0
pandas_datareader: None
The text was updated successfully, but these errors were encountered: