Dataframe.sample() isn't validating frac · Issue #27451 · pandas-dev/pandas (original) (raw)

Minor/trivial bug:

https://github.com/pandas-dev/pandas/blob/master/pandas/core/generic.py#L4960

Shouldn't sample() check that frac is between 0 and 1 somewhere?

Doc improvement suggestion:

Could anyone confirm that replace=True|False means allowing|disallowing sampling the same row more than once?

Methinks the docs could use an update to make what replace does clearer for newcomers - or at least for those who aren't familiar with numpy.