MCPcopy Create free account
hub / github.com/dask/dask / sample

Function sample

dask/dataframe/methods.py:397–399  ·  view source on GitHub ↗
(df, state, frac, replace)

Source from the content-addressed store, hash-verified

395
396
397def sample(df, state, frac, replace):
398 rs = np.random.RandomState(state)
399 return df.sample(random_state=rs, frac=frac, replace=replace) if len(df) > 0 else df
400
401
402def drop_columns(df, columns, dtype):

Callers

nothing calls this directly

Calls 2

sampleMethod · 0.80
RandomStateMethod · 0.45

Tested by

no test coverage detected