Class: Daru::Accessors::DataFrameByVector

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

Instance Method Summary collapse

Constructor Details

#initialize(data_frame) ⇒ DataFrameByVector

Returns a new instance of DataFrameByVector.


4
5
6
# File 'lib/daru/accessors/dataframe_by_vector.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_vector.rb', line 8

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

#[]=(name, vectors) ⇒ Object


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

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