Sha256: 07bd9c582079ef361ac4fdbe185f2962dc00a1cfeeb7095ac7b1e1ae67ee04dc
Contents?: true
Size: 799 Bytes
Versions: 5
Compression:
Stored size: 799 Bytes
Contents
loop_count: 3 contexts: - name: 0.2.2 gems: red_amber: 0.2.2 - name: 0.3.0 gems: red_amber: 0.3.0 - name: HEAD prelude: | $LOAD_PATH.unshift(File.expand_path('lib')) prelude: | require 'red_amber' require 'datasets-arrow' ds = Datasets::Rdatasets.new('tidyr', 'billboard') df = RedAmber::DataFrame.new(ds.to_arrow) sub_df = df.pick(:track, df.keys.select{ |k| k.start_with? 'wk' }) long_df = df.to_long(:artist, :track, :'date.entered', name: :week, value: :rank) benchmark: 'R01: Transpose a DataFrame': | sub_df.transpose(name: :week) 'R02: Reshape to longer DataFrame': | df.to_long(:artist, :track, :'date.entered', name: :week, value: :rank) 'R03: Reshape to wider DataFrame': | long_df.to_wide(name: :week, value: :rank)
Version data entries
5 entries across 5 versions & 1 rubygems