-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Timezone dropped when dataframes are joined after resampling #13783
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
pls show a copy-paste reproducible example, simple examples work just fine in 0.18.1 (and master).
|
might be related to #7795 but only tangentially |
Here's a copy paste reproducible example:
The output is:
Expected Output
Should I directly edit the main post I wrote? |
Anyway it looks to me exactly the same problem you've linked (#7795). |
This looks work on current master? Though tests are needed... (I'm going to cover it on #13660) |
ah example is incorrect. maybe:
|
The point is, as I said in the main post, that this problem happens also with the concat().
The output is the same as with the join():
Should this be reported in another "issue"? |
No new issue is needed, as |
I believe this issue is fixed, someone want to do a PR with a validation test? |
I've already explained the problem link.
When I merge 2 dataframes, using join() or concat() (I didn't try with merge) and one of these has been previously resampled, averaging the values each 15 minutes, i loose the timezone
Code Sample, a copy-pastable example if possible
df1 = df1.resample('15Min').mean()
df = pd.concat([df1, df2], axis=1)
Expected Output
The output looses the timezone and it comes back to 'UTC'.
I think the problem is related to this issue, where the same problem comes out when aggregating.
output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-28-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: None
pip: 8.1.2
setuptools: 24.0.1
Cython: None
numpy: 1.11.1
scipy: 0.17.1
statsmodels: None
xarray: None
IPython: 4.2.1
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.13
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: