dask-sql icon indicating copy to clipboard operation
dask-sql copied to clipboard

[BUG] on Starter example

Open tiraldj opened this issue 1 year ago • 1 comments

<Easy to fix. On https://dask-sql.readthedocs.io/en/latest/ in the Example code the last line is

# ...or use it for another computation
result.sum.mean().compute()

this throws an error because 'sum' was accidentally left in.

the code should be:

# ...or use it for another computation
result.mean().compute()

tiraldj avatar Mar 15 '24 15:03 tiraldj

Thanks for raising @tiraldj, it looks like the sql query creates a column called sum but it cannot be accessed via result.sum since that's a reserved for the function sum. Like you mentioned result.mean().compute() or result["sum"].mean().compute() probably accomplish what the example is going for. @tiraldj is this something you would be comfortable in submitting a PR for? It's okay if you can't as well 😄 .

ayushdg avatar Mar 15 '24 18:03 ayushdg