Sha256: 4f206b9561cb1c2b7d8c32882123e159fdd57811040c7295b623a5c92a6f8f61

Contents?: true

Size: 585 Bytes

Versions: 8

Compression:

Stored size: 585 Bytes

Contents

require_relative '../remi_spec'

describe DataSource::DataFrame do
  it "converts data into a dataframe" do
    source_dataframe = Remi::DataSource::DataFrame.new(
      fields: {
        :col1 => {},
        :col2 => {}
      },
      data: [
        ['11', '12'],
        ['21', '22'],
        ['31', '32']
      ]
    )

    expected_df = Remi::DataFrame::Daru.new(
      {
        col1: ['11', '21', '31'],
        col2: ['12', '22', '32']
      }
    )

    expect(source_dataframe.df).to be_a Remi::DataFrame
    expect(source_dataframe.df.to_a).to eq expected_df.to_a
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
remi-0.2.42 spec/data_subject/data_frame.rb
remi-0.2.41 spec/data_subject/data_frame.rb
remi-0.2.40 spec/data_subject/data_frame.rb
remi-0.2.39 spec/data_subject/data_frame.rb
remi-0.2.38 spec/data_subject/data_frame.rb
remi-0.2.37 spec/data_subject/data_frame.rb
remi-0.2.36 spec/data_subject/data_frame.rb
remi-0.2.35 spec/data_subject/data_frame.rb