Noticed that `approx_count_distinct` isn't in our ...
# daft-dev
c
Noticed that
approx_count_distinct
isn't in our docs, PR: https://github.com/Eventual-Inc/Daft/pull/2805 cc @jay @Raunak Bhagat Also, this and
approx_percentiles
aren't exposed as methods on Grouped Dataframe and Dataframe, was there a reason for this?
r
Jay and I discussed about writing docs for
approx_count_distinct
but I wasn't able to get around to it. I also wasn't aware that we had to add it to Grouped DataFrame as well, that's my bad.
c
> Jay and I discussed about writing docs for
approx_count_distinct
Like separate from the expression docs?
r
I wrote the expression docs, but not sure how they get propagated to the docs available at getdaft.io... Are those expressions docs automatically integrated into the webpage documentation available at getdaft.io?
I have the docs written in expressions.py, but not sure if I had to copy-paste it somewhere else for them to appear on getdaft.io.
c
you have to put them manually in
docs/source/api_docs/expressions.rst
. Only then, do they get auto generated onto the website.
❤️ 1
Unfortunately we don't have a good way of checking, except using our good old eyes
👀 1
j
I’m trying to build a mechanism that will at least give us a preview of the website on your PRs
clapclap e 1
❤️ 1
I don’t know yet how to do the checking for any missing methods unfortunately
Maybe some kind of decorator or annotation? Not quite sure yet. If someone has ideas lmk
r
Ahh okay, makes sense. I'll add the group-by stuff in a PR soon too. Sorry about that y'all.
j
I actually think it might be ok to not have those on the dataframe-level
Not sure though
It’s syntactic sugar for calling approx_count_distinct on every column I guess 🤷
c
Sure but we should make the aggregation expressions more discoverable though: https://www.getdaft.io/projects/docs/en/stable/api_docs/expressions.html#aggregation For example, we should link those agg exprs in the
.agg
expression docs: https://www.getdaft.io/projects/docs/en/stable/api_docs/doc_gen/dataframe_methods/daft.DataFrame.agg.html, and probably in the
aggregations and grouping
user guide as well. https://www.getdaft.io/projects/docs/en/stable/user_guide/daft_in_depth/aggregations.html Currently this one only talks about the agg methods, not the expressions
j
^ yes for sure
c
Ok modified the PR to reflect making the agg exprs more discoverable, and improve the grouping/agg user guide. @Raunak Bhagat could you give it another pass? also for reference, here's how you can build the docs locally: https://github.com/Eventual-Inc/Daft/blob/main/docs/CONTRIBUTING.md
👍 1
r
Looks good to me!
j
Interestingly doctests are failing (on my local machine) because of precision issues I think 😛