idiv creates a copy? · Issue #12962 · pandas-dev/pandas (original) (raw)
Code Sample, a copy-pastable example if possible
import pandas as pd
mylist = [pd.Series([1,2,3])]
for m in mylist:
m /= 2.0
print '***printing m***'
print m
print
print '***mylist[0] - should be same as m, but isnt***'
print mylist[0]
observed output:
***printing m***
0 0.5
1 1.0
2 1.5
dtype: float64
***mylist[0] - should be same as m, but isnt***
0 1
1 2
2 3
dtype: int64
Expected Output
***printing m***
0 1
1 2
2 3
dtype: float64
***mylist[0] - should be same as m, but isnt***
0 1
1 2
2 3
dtype: int64
output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 14.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.0
nose: None
pip: 8.1.1
setuptools: 20.6.7
Cython: None
numpy: 1.11.0
scipy: None
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
boto: None