eland.DataFrame.sample

DataFrame.sample(n: int | None = None, frac: float | None = None, random_state: int | None = None) DataFrame

Return n randomly sample rows or the specify fraction of rows

Parameters

nint, optional

Number of documents from index to return. Cannot be used with frac. Default = 1 if frac = None.

fracfloat, optional

Fraction of axis items to return. Cannot be used with n.

random_stateint, optional

Seed for the random number generator.

Returns

eland.DataFrame:

eland DataFrame filtered containing n rows randomly sampled

See Also

pandas.DataFrame.sample