This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-27
Channels
- # announcements (1)
- # aws (8)
- # babashka (77)
- # babashka-sci-dev (8)
- # beginners (29)
- # biff (2)
- # calva (13)
- # cljs-dev (1)
- # clojure (42)
- # clojure-europe (205)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (4)
- # clojurescript (58)
- # conjure (9)
- # data-science (7)
- # datalevin (19)
- # datomic (3)
- # emacs (7)
- # fulcro (15)
- # gratitude (8)
- # lsp (52)
- # meander (3)
- # membrane (92)
- # off-topic (12)
- # re-frame (16)
- # reagent (4)
- # reitit (15)
- # releases (1)
- # sci (30)
- # shadow-cljs (34)
- # tools-deps (5)
- # xtdb (17)
With tablecloth, is a single column considered a "Series" in a way similar to pandas? I'm having trouble understanding why I can't use dfn/mean
on a single column Dataset
Are you trying to use the whole Dataset
object as an argument to dfn/mean
? I don't think there's that kind of polymorphism built in - you'd have to call tablecloth.api/column
or tablecloth.api/map-columns
to operate on the column within the dataset.
There is no such polymorphism. You need to pass a column object, eg. (dfn/mean (ds :column-name))
So maybe my initial sin is using tc/select-colums
to select only one column? That creates a Dataset, that's why I was trying to figure out if a single column becomes a "series" or something like that because it seems like that's what dfn/mean
expects to operate on
select-columns
creates a dataset with a subset of columns. To select a column use a dataset as a map or call tc/column
. More about it here: https://scicloj.github.io/tablecloth/index.html#Columns_and_rows