Skip to content

sum of columns #8815

Answered by gforsyth
ozgurkalan asked this question in Q&A
Mar 28, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey @ozgurkalan -- I don't think there's a good way to do this right now. We're chatting on Zulip about what the API for this style of operation might look like. In the meantime, here's a slightly gross workaround that should do the trick:

[ins] In [1]: from ibis.interactive import *

[ins] In [2]: t = ibis.memtable(
         ...:     {
         ...:         "fy20": [1, 2, 3, 4, 5],
         ...:         "fy21": [5, 6, 7, 8.1, 9],
         ...:         "fy22": [22, 22, 24, 25, 26],
         ...:     }
         ...: )

[ins] In [3]: t
Out[3]: 
┏━━━━━━━┳━━━━━━━━━┳━━━━━━━┓
┃ fy20fy21fy22  ┃
┡━━━━━━━╇━━━━━━━━━╇━━━━━━━┩
│ int64float64int64 │
├───────┼─────────┼───────┤
│     1

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ozgurkalan
Comment options

Answer selected by ozgurkalan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants