massung / tabular-asa

A column-oriented, dataframe implementation for Racket.
MIT License
17 stars 4 forks source link

Documentation bugs? #4

Closed jbclements closed 5 months ago

jbclements commented 5 months ago

Are there other functions that return sequences that are documented as returning tables?

jbclements commented 5 months ago

I also did not understand the table-apply docs at all, I would instead write something like this: "Like table-map, but rather than calling the procedure with a single argument (a list of values), calls the procedure with n arguments, where n is the number of columns in the given table. In other words, (table-apply t proc cols) is equivalent to (table-apply t (lambda (row) (apply proc row)) cols)"

jbclements commented 5 months ago

Also, a simple typo in pretty-print-rows:

"Controls the nmaximum umber of rows output by [write-table]" Should instead start "Controls the maximum number of rows..."

jbclements commented 5 months ago

Let me know if you accept pull requests?

jbclements commented 5 months ago

It looks like build-column isn't provided ?

massung commented 5 months ago

@jbclements - Been a while since I looked at the repo and code. Let me read through and catch up a bit. But thank you so much for the issues (if nothing else, I love seeing my code being used by others!).

I absolutely accept pull requests as long as there's an attempt to stay consistent with the coding style. So if you have suggestions, please feel free.

For build-column not provided, I'll have to try and remember if that was intentional or not (and "why" if not, otherwise just provide it).

Your documentation suggestions are definitely better.

massung commented 5 months ago

Looking through, the documentation for table-map and table-apply is wrong (they should return sequence?). The reason for this is that I didn't want to try and create a table automatically and pick column names. It's trivial enough to just wrap them in a call to table-read/sequence and create a new table from those results.

I like your documentation suggestions for them. Let me know if you plan on making a PR or not. If not, I'll update the docs. If you plan to, can you also update the return type?

massung commented 5 months ago

Fixed docs via 349fdb7. Please feel free to open a PR with better docs and I'm happy to look at them!

Exposed build-column and empty-column (which was also documented, but not exposed) in ce819c1. Thanks for finding that!