-
Hi, First of all - thank you for this project (and I started playing with it recently, trying to re-create some of my routines from Pandas, but I have failed quite fast with some operations - and these are rather basic ones. For example, Same situation with selecting a subset of columns for pretty-printing, which is trivially doable in So my question is: are such things even possible in Thanks! EDIT: I'm aware of the possibility of selecting multiple columns with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi xor-xor, I'm glad you asked, as this is something I've been thinking about for the last few months. I have become frustrated with both the current First, let me answer your basic question. You can slice multiple columns with the slice function (which can also be accessed with
The choice of So, At this point, I question the need/wisdom of duplicating query functionality in data frame. Why not just make Pros
Cons
At the moment, the biggest obstacle is the string based method of specifying queries. Using s-sql, from Postmodern, will be both more lisp-like and also eliminate some of the problems with the SQL string parser currently in So, summarising, my current thinking is:
Comments, questions, feedback welcome. |
Beta Was this translation helpful? Give feedback.
Hi xor-xor,
I'm glad you asked, as this is something I've been thinking about for the last few months. I have become frustrated with both the current
sqldf
and using the data-frame API. So, I'm going to give a somewhat longer answer than is strictly necessary because it will give you some background, but also serve as a record of the thinking that went into the future design. I'm glad you open this as a discussion, because I would like to hear what others think.First, let me answer your basic question. You can slice multiple columns with the slice function (which can also be accessed with
select
). This will return a data frame of Cartesian selections. For example, usingmtcars
, we can say: