nushell/docs/commands/dfr_sample.md
Justin Ma c0a1d18e3d
update #4455, regenerate commands' docs and update make_docs script (#4586)
* feat: update #4455, regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

554 B

title layout version
dfr sample command 0.59.0

Create sample dataframe

Signature

> dfr sample --n-rows --fraction --replace

Parameters

  • --n-rows {int}: number of rows to be taken from dataframe
  • --fraction {number}: fraction of dataframe to be taken
  • --replace: sample with replace

Examples

Sample rows from dataframe

> [[a b]; [1 2] [3 4]] | dfr to-df | dfr sample -n 1

Shows sample row using fraction and replace

> [[a b]; [1 2] [3 4] [5 6]] | dfr to-df | dfr sample -f 0.5 -e