Method: Daru::DataFrame#transpose
- Defined in:
- lib/daru/dataframe.rb
#transpose ⇒ Object
Transpose a DataFrame, tranposing elements and row, column indexing.
1800 1801 1802 1803 1804 1805 1806 1807 |
# File 'lib/daru/dataframe.rb', line 1800 def transpose arrys = [] each_vector do |vec| arrys << vec.to_a end Daru::DataFrame.new(arrys.transpose, index: @vectors, order: @index, dtype: @dtype, name: @name) end |