class Dataframe::Row

Defined in:

row.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(values : Array(Type), headers : Array(String)) #

Creates a new Row with the specified headers and values.


[View source]
def self.new #

Creates an empty Row.


[View source]

Instance Method Detail

def ==(other : Row) : Bool #

[View source]
def [](key : String) : Type #

Returns the value for the key given by key.


[View source]
def []=(key : String, value : Type) #

Sets the value of key to the given value.


[View source]
def []?(key : String) : Type #

Returns the value for the key given by key, or nil if it doesn't exist.


[View source]
def headers : Array(String) #

Returns the headers of the Row.


[View source]
def to_a : Array(Type) #

Returns the values of the Row as an Array of type Type.


[View source]
def to_h : Hash(String, Type) #

Returns the data of the Row as a Hash.


[View source]
def to_s(io : IO) : Nil #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

[View source]