eland.DataFrame.sample¶
-
DataFrame.
sample
(n: Optional[int] = None, frac: Optional[float] = None, random_state: Optional[int] = None) → eland.dataframe.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