-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Multiplication of two serieses changes the the timezone from the given serieses #33671
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
Thanks for the report. Confirmed on master. @eyjay-ok do you know if this happened in pandas 0.25? |
Yes, it was the same behavior in Pandas 0.25.1 |
Thanks for the report. This is the expected behavior. Please see https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#working-with-time-zones
|
I think the surprising behavior is that one of the operands ( |
Ah that is really weird behavior. Yes, that definitely looks like a bug. Sorry for reading the issue too quickly. |
This fixes the issue locally:
Not sure if always copying is necessary though. Maybe we should set |
We could set copy=True if the indices at this point: https://github.com/pandas-dev/pandas/blob/master/pandas/core/generic.py#L8486-8491 are not equal. (else block). This works locally. |
(since this is my first bug report I am happy for any feedback :) )
Problem description
The timezone of the series 'cet_series' changes by the multiplication. Since it is only an input series the timezone should stay the same.
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.8.2.final.0
python-bits : 64
OS : Linux
OS-release : 5.3.0-46-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.1
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 19.2.3
setuptools : 41.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : 2.4.4
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.13.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.3.13
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
The text was updated successfully, but these errors were encountered: