We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Issue:
import pandas as pd from datetime import datetime ### Concat'ing two UTC times works first = pd.DataFrame([[datetime(2016, 1, 1)]]) first[0] = first[0].dt.tz_localize('UTC') second = pd.DataFrame([[datetime(2016, 1, 2)]]) second[0] = second[0].dt.tz_localize('UTC') print pd.concat([first, second]) # Works ### Concat'ing two London times doesn't work first = pd.DataFrame([[datetime(2016, 1, 1)]]) first[0] = first[0].dt.tz_localize('Europe/London') second = pd.DataFrame([[datetime(2016, 1, 2)]]) second[0] = second[0].dt.tz_localize('Europe/London') print pd.concat([first, second]) # Doesn't work - returns a DF full of NaTs ### Concat'ing 2+1 London times works first = pd.DataFrame([[datetime(2016, 1, 1)], [datetime(2016, 1, 2)]]) first[0] = first[0].dt.tz_localize('Europe/London') second = pd.DataFrame([[datetime(2016, 1, 3)]]) second[0] = second[0].dt.tz_localize('Europe/London') print pd.concat([first, second]) # Works ### Concat'ing 1+2 London times doesn't work first = pd.DataFrame([[datetime(2016, 1, 1)]]) first[0] = first[0].dt.tz_localize('Europe/London') second = pd.DataFrame([[datetime(2016, 1, 2)], [datetime(2016, 1, 3)]]) second[0] = second[0].dt.tz_localize('Europe/London') print pd.concat([first, second]) # Doesn't work - first row is NaT
Dependencies:
INSTALLED VERSIONS ------------------ commit: None python: 2.7.11.final.0 python-bits: 64 OS: Linux OS-release: 3.17.7-300.fc21.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 pandas: 0.17.1 nose: None pip: 8.0.2 setuptools: 19.4 Cython: None numpy: 1.10.2 scipy: 0.16.0 statsmodels: None IPython: 4.0.1 sphinx: 1.3.1 patsy: None dateutil: 2.4.2 pytz: 2015.7 blosc: None bottleneck: None tables: None numexpr: 2.4.4 matplotlib: 1.5.0 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: 3.5.0 bs4: 4.4.1 html5lib: None httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None Jinja2: None
The text was updated successfully, but these errors were encountered:
I can replicate with python 2.7.10, windows 10, pandas 0.17.1, numpy 1.9.3.
Sorry, something went wrong.
hmm, partially was addressed in #12195
but still looks buggy
TST: validation tests for concat of same timezones
563b23b
closes pandas-dev#12217
dc6c678
Successfully merging a pull request may close this issue.
Issue:
Dependencies:
The text was updated successfully, but these errors were encountered: