domitry/nyaplot

ActiveRecord-like syntax for DataFrame

translunar opened this issue · 3 comments

It'd be super cool if we could use the SQL-like features of ActiveRecord with DataFrame. I haven't given much thought to how this would look, except perhaps df.where(:my_column => 3). I think this could help us to generate some summary-type dataframes quickly. Let's say, for example, that you want the mean of some column, but only where another column is between 0 and 3.

Hmm, I do not have enough knowledge about ActiveRecord, but I'll search about it. It looks great if the modifying is not destructive, but could you try it in your repository?

Hey @domitry! Sameer (@v0dro) is working on a DataFrame library called daru and one of his objectives is to add some sort of ActiveRecord-like syntax to it, just like John suggested. (arel is the library responsible for the cool syntax used in ActiveRecord)

He's also working to replace Statsample::Dataset with Daru::DataFrame, so it'd be really neat if the same data structure could be used in Nyaplot as well. :)

What do you think?

v0dro commented

This exists in daru now.

Close this?