Method: Rust::DataFrame#shuffle
- Defined in:
- lib/rust/core/types/dataframe.rb
#shuffle(*args) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/rust/core/types/dataframe.rb', line 53 def shuffle(*args) result = DataFrame.new(@labels) buffer = [] self.each do |row| buffer << row end buffer.shuffle!(*args).each do |row| result << row end return result end |