Closed ausangshukla closed 4 hours ago
df = Polars::DataFrame.new({"a" => ["one", "two", "three"], "b" => [1, 2, 3], "c" => ["group1", "group1", "group2"]}) df.plot("a", "b", type: "line", group: "c")
This works well
df = Polars::DataFrame.new({"a" => ["one", "two", "three"], "b" => [1, 2, 3], "c" => ["group1", "group1", "group2"], "d"=>[1,2,3,4,5] })
How to plot this, as we have an additional col d?
Thanks
Hi @ausangshukla, plotting only supports 2 - 3 columns. You can either transform the data frame to get it to that number of columns, or for more advanced plotting, use Vega.rb directly.
df = Polars::DataFrame.new({"a" => ["one", "two", "three"], "b" => [1, 2, 3], "c" => ["group1", "group1", "group2"]}) df.plot("a", "b", type: "line", group: "c")
This works well
df = Polars::DataFrame.new({"a" => ["one", "two", "three"], "b" => [1, 2, 3], "c" => ["group1", "group1", "group2"], "d"=>[1,2,3,4,5] })
How to plot this, as we have an additional col d?
Thanks