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

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

Comments

Projects
None yet
3 participants
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 added the Clean label Feb 18, 2016

jreback added this to the 0.18.0 milestone Feb 18, 2016

Contributor

jreback commented Feb 18, 2016

@jreback jreback modified the milestone: 0.18.1, 0.18.0 Feb 18, 2016

Contributor

TomAugspurger commented Feb 18, 2016

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)
Contributor

paul-reiners commented Feb 29, 2016

I think I have this finished. See #12490.

@jreback jreback modified the milestone: 0.18.0, 0.18.1 Feb 29, 2016

@paul-reiners paul-reiners added a commit to paul-reiners/pandas that referenced this issue Mar 2, 2016

@paul-reiners paul-reiners CLN: Removed pandas.util.testing.choice
Removed pandas.util.testing.choice() method.
Replaced all references to it with calls to np.random.choice().
Added entry to whatsnew.

#12386
5f2d9b5

paul-reiners referenced this issue Mar 2, 2016

Closed

CLN: Removed pandas.util.testing.choice #12505

3 of 3 tasks complete
Contributor

paul-reiners commented Mar 2, 2016

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

jreback closed this in eba7803 Mar 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment