We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi I found that each_group and get_group method do not work as expected when you set a new index. For example:
each_group
get_group
require 'daru' df = Daru::DataFrame.new( x: [1,2,3,4,5,6], z: %w(a a b b c c)) df.index = [1,2,3,4,5,6] gr = df.group_by(:z) gr.each_group{|g| p g} ##<Daru::DataFrame(2x2)> # x z # 1 2 a # 2 3 b ##<Daru::DataFrame(2x2)> # x z # 3 4 b # 4 5 c #NoMethodError: undefined method `size' for nil:NilClass #gems/daru-0.2.1/lib/daru/dataframe.rb:168:in `block in rows' gr.get_group("a") #NoMethodError: undefined method `each' for nil:NilClass #gems/daru-0.2.1/lib/daru/core/group_by.rb:262:in `get_group'
Sorry if this is duplicated issue.
The text was updated successfully, but these errors were encountered:
# gr.get_group("a") gr.get_group(["a"])
Sorry, something went wrong.
This line.
daru/lib/daru/core/group_by.rb
Line 262 in 984ff72
transpose[idx] work as expected only when index is 0,1,2,...
transpose[idx]
Thanks for pointing out this error. Someone will surely look into it.
No branches or pull requests
Hi
I found that
each_group
andget_group
method do not work as expected when you set a new index.For example:
Sorry if this is duplicated issue.
The text was updated successfully, but these errors were encountered: