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

Fix to BUG GH11698. added default value of mask #11715

Closed
wants to merge 1 commit into from

Conversation

varunkumar-dev
Copy link
Contributor

closes #11698

Please review.

# GH 11698
# test for mixed data types.
df = pd.DataFrame([('-', pd.to_datetime('20150101')), ('a', pd.to_datetime('20150102'))])
df.replace('-', np.nan, inplace=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use result = df.replace(....)

never use inplace in a test, unless you are explicity testing something that involves it explicity. this is not pandonic at all.

@jreback jreback added Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Internals Related to non-user accessible pandas implementation labels Nov 29, 2015
@jreback jreback added this to the 0.18.0 milestone Nov 29, 2015
@jreback
Copy link
Contributor

jreback commented Nov 29, 2015

minor change, ping when green.

@varunkumar-dev
Copy link
Contributor Author

modified test case.
This branch has some conflicts . Please check.

@jreback
Copy link
Contributor

jreback commented Nov 29, 2015

u need to fix the conflict

@varunkumar-dev varunkumar-dev force-pushed the fix_replace branch 4 times, most recently from 2d30b16 to c78536a Compare November 30, 2015 15:58
@varunkumar-dev varunkumar-dev force-pushed the fix_replace branch 2 times, most recently from 8f0d583 to f646870 Compare November 30, 2015 16:57
@varunkumar-dev
Copy link
Contributor Author

@jreback There is a conflict in whatsnew file. When I am adding the bug fix message and trying to merge with the latest code , it always shows me conflicts. I merged my whatsnew file with the latest code but there is still a conflict. Please help.

@jreback
Copy link
Contributor

jreback commented Dec 1, 2015

lots of help on this: http://githowto.com/resolving_conflicts

you basically edit the conflicted file, picking the correct parts out. then add the files, rebase, and push

@jreback
Copy link
Contributor

jreback commented Dec 2, 2015

merged via 8ec8487

thanks!

@jreback jreback closed this Dec 2, 2015
@varunkumar-dev varunkumar-dev deleted the fix_replace branch December 3, 2015 02:07
@varunkumar-dev
Copy link
Contributor Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Internals Related to non-user accessible pandas implementation Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pandas.DataFrame.replace raises UnboundLocalError on mixed data types
2 participants