Accessing with .ix removes time zone info #13697
Labels
Bug
Duplicate Report
Duplicate issue or pull request
Indexing
Related to indexing on series/frames, not to indexes themselves
Timezones
Timezone data dtype
Code Sample, a copy-pastable example if possible
I have a dataframe with two columns
start
andend
both have the dtype ofdatetime64[ns, tzoffset(None, -21600)]
but depending on how I access it the output removes the timezone info for for examplebut
Issue rises when I am doing something like this (
length
is pandas.tslib.Timedelta):However if I do it like this:
df.ix[0, 'end'] = df['start'][0] + df.ix[0, 'length']
It works fine since that type of selection does not lose the timezone info.
output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Linux
OS-release: 4.5.7-200.fc23.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.utf8
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.2
setuptools: 20.1.1
Cython: 0.23.4
numpy: 1.11.1
scipy: 0.17.1
statsmodels: 0.6.1
xarray: None
IPython: 4.1.1
sphinx: 1.2.3
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.6.1
blosc: None
bottleneck: 0.6.0
tables: None
numexpr: 2.4.6
matplotlib: 1.5.1
openpyxl: 1.8.6
xlrd: None
xlwt: None
xlsxwriter: None
lxml: 3.4.4
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext lo64)
jinja2: 2.8
boto: 2.40.0
pandas_datareader: None
The text was updated successfully, but these errors were encountered: