Class: Daru::Accessors::DataFrameByVector
- Inherits:
-
Object
- Object
- Daru::Accessors::DataFrameByVector
- Defined in:
- lib/daru/accessors/dataframe_by_vector.rb
Instance Method Summary collapse
- #[](*names) ⇒ Object
- #[]=(name, vectors) ⇒ Object
-
#initialize(data_frame) ⇒ DataFrameByVector
constructor
A new instance of DataFrameByVector.
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 |