Class: Wandb::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/wandb.rb

Overview

Table class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data: {}, columns: []) ⇒ Table

Returns a new instance of Table.



215
216
217
218
219
# File 'lib/wandb.rb', line 215

def initialize(data: {}, columns: [])
  @table = Wandb.__pyptr__.Table.new(data: data, columns: columns)
  @data = data
  @columns = columns
end

Instance Attribute Details

#columnsObject

Returns the value of attribute columns.



213
214
215
# File 'lib/wandb.rb', line 213

def columns
  @columns
end

#dataObject

Returns the value of attribute data.



213
214
215
# File 'lib/wandb.rb', line 213

def data
  @data
end

#tableObject

Returns the value of attribute table.



213
214
215
# File 'lib/wandb.rb', line 213

def table
  @table
end

Instance Method Details

#__pyptr__Object



221
222
223
# File 'lib/wandb.rb', line 221

def __pyptr__
  @table
end

#add_column(name, data) ⇒ Object



229
230
231
# File 'lib/wandb.rb', line 229

def add_column(name, data)
  @table.add_column(name, data)
end

#add_data(*args) ⇒ Object



225
226
227
# File 'lib/wandb.rb', line 225

def add_data(*args)
  @table.add_data(*args)
end

#get_column(name) ⇒ Object



233
234
235
# File 'lib/wandb.rb', line 233

def get_column(name)
  @table.get_column(name)
end

#to_pandasObject



245
246
247
# File 'lib/wandb.rb', line 245

def to_pandas
  @table.get_dataframe
end