Skip to content
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

BUG: #35526

Closed
shadowbourne opened this issue Aug 3, 2020 · 1 comment
Closed

BUG: #35526

shadowbourne opened this issue Aug 3, 2020 · 1 comment
Labels
Bug Duplicate Report Duplicate issue or pull request

Comments

@shadowbourne
Copy link

shadowbourne commented Aug 3, 2020


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

# Your code here
import pandas as pd
def edit(row):
    row["poo"] = 9
    return row
df = pd.DataFrame({"foo":[1,2,3,4],"Hi":[0,1,0,2]})
print(df.head())
print(df.apply(edit, axis=1))

Problem description

Returns completely wrong output on my system, but anyone else's it seems fine. (pandas 1.1.0, python 3.8.4 and 3.7.8)
[this should explain why the current behaviour is a problem and why the expected output is a better solution]

Bugged Output:

foo Hi poo
0 1 0 9
1 1 0 9
2 1 0 9
3 1 0 9

Expected Output

foo Hi poo
0 1 0 9
1 2 1 9
2 3 0 9
3 4 2 9

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit : d9fff27 python : 3.7.8.final.0 python-bits : 64 OS : Windows OS-release : 10 Version : 10.0.18362 machine : AMD64 processor : AMD64 Family 21 Model 2 Stepping 0, AuthenticAMD byteorder : little LC_ALL : None LANG : en_GB.UTF-8 LOCALE : None.None

pandas : 1.1.0
numpy : 1.19.1
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.1.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
None
[paste the output of pd.show_versions() here leaving a blank line after the details tag]

@shadowbourne shadowbourne added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 3, 2020
@simonjayhawkins
Copy link
Member

Thanks @shadowbourne for the report. This is a duplicate of #35462 so closing.

@simonjayhawkins simonjayhawkins removed the Needs Triage Issue that has not been reviewed by a pandas team member label Aug 3, 2020
@simonjayhawkins simonjayhawkins added this to the No action milestone Aug 3, 2020
@simonjayhawkins simonjayhawkins added the Duplicate Report Duplicate issue or pull request label Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants