Skip to content

CLN: remove pandas.util.testing.choice #12386

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

Closed
jreback opened this issue Feb 18, 2016 · 4 comments
Closed

CLN: remove pandas.util.testing.choice #12386

jreback opened this issue Feb 18, 2016 · 4 comments
Labels
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Feb 18, 2016

xref #12384

so I think this was for numpy < 1.7 compat.

we should remove pandas.util.testing.choice
https://github.com/pydata/pandas/blob/master/pandas/util/testing.py#L173

there might be some latent doc references

@jreback jreback added the Clean label Feb 18, 2016
@jreback jreback added this to the 0.18.0 milestone Feb 18, 2016
@jreback
Copy link
Contributor Author

jreback commented Feb 18, 2016

cc @carroux

@TomAugspurger
Copy link
Contributor

pandas/tests/frame/test_query_eval.py
99:        a = tm.choice(['red', 'green'], size=10)
100:        b = tm.choice(['eggs', 'ham'], size=10)
152:        a = tm.choice(['red', 'green'], size=10)
153:        b = tm.choice(['eggs', 'ham'], size=10)
246:        a = tm.choice(['red', 'green'], size=10)
978:        a = Series(tm.choice(list('abcde'), 20))

pandas/tests/test_graphics_others.py
638:            gender = tm.choice(['male', 'female'], size=n)
712:            gender_int = tm.choice([0, 1], size=n)

pandas/tests/test_graphics.py
63:            gender = tm.choice(['Male', 'Female'], size=n)
64:            classroom = tm.choice(['A', 'B', 'C'], size=n)
3864:            gender = tm.choice(['male', 'female'], size=n)

pandas/tools/tests/test_merge.py
239:            df = DataFrame({'a': tm.choice(['m', 'f'], size=3),
241:            df2 = DataFrame({'a': tm.choice(['m', 'f'], size=10),
248:            df = DataFrame({'a': tm.choice(['m', 'f'], size=3),
251:            df2 = DataFrame({'a': tm.choice(['m', 'f'], size=10),
257:            df = DataFrame({'a': tm.choice(['m', 'f'], size=3),
259:            df2 = DataFrame({'a': tm.choice(['m', 'f'], size=10),

vb_suite/groupby.py
146:obj = tm.choice(list('ab'), size=n).astype(object)

@paul-reiners
Copy link
Contributor

I think I have this finished. See #12490.

@jreback jreback modified the milestones: 0.18.0, 0.18.1 Feb 29, 2016
paul-reiners added a commit to paul-reiners/pandas that referenced this issue Mar 2, 2016
Removed pandas.util.testing.choice() method.
Replaced all references to it with calls to np.random.choice().
Added entry to whatsnew.

pandas-dev#12386
@paul-reiners
Copy link
Contributor

This is fixed in pull request #12505. Tests have passed, it's all in one commit, and whatsnew has been added.

@jreback jreback closed this as completed in eba7803 Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants