nyaplot icon indicating copy to clipboard operation
nyaplot copied to clipboard

ActiveRecord-like syntax for DataFrame

Open translunar opened this issue 10 years ago • 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.

translunar avatar Aug 28 '14 14:08 translunar

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?

domitry avatar Aug 29 '14 14:08 domitry

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?

agarie avatar Apr 24 '15 19:04 agarie

This exists in daru now.

Close this?

v0dro avatar Aug 05 '15 11:08 v0dro