Class: Daru::Accessors::DataFrameByRow

Inherits:
Object
  • Object
show all
Defined in:
lib/daru/accessors/dataframe_by_row.rb

Instance Method Summary collapse

Constructor Details

#initialize(data_frame) ⇒ DataFrameByRow

Returns a new instance of DataFrameByRow.


4
5
6
# File 'lib/daru/accessors/dataframe_by_row.rb', line 4

def initialize data_frame
  @data_frame = data_frame
end

Instance Method Details

#[](*names) ⇒ Object


8
9
10
# File 'lib/daru/accessors/dataframe_by_row.rb', line 8

def [](*names)
  @data_frame[*names, :row]
end

#[]=(name, vector) ⇒ Object


12
13
14
# File 'lib/daru/accessors/dataframe_by_row.rb', line 12

def []=(name, vector)
  @data_frame[name, :row] = vector
end