Minor: Improve DataFrame docs, add examples#9159
Conversation
| /// # Ok(()) | ||
| /// # } | ||
| /// ``` | ||
| pub async fn write_parquet( |
There was a problem hiding this comment.
This is the example I wanted to write, but I started clicking through the API to get here and I saw too much along the way that needed to be fixed too, so I got a bit carried away and worked on quite a bit of the docs
carols10cents
left a comment
There was a problem hiding this comment.
LOVE IT!! Thank you!!!!
I just have a few tiny things I noticed, but these docs are so much better!! 😍
| /// Convert the logical plan represented by this DataFrame into a physical plan and | ||
| /// execute it, collecting all resulting batches into memory | ||
| /// Executes this DataFrame and collects all results into a vector of RecordBatch. | ||
| /// Execute this `DataFrame` and buffer all resulting `RecordBatch`es into memory. |
There was a problem hiding this comment.
This change in particular is excellent! The reason I'd want to call this method is precisely because I don't want to think about logical plans and physical plans and such 😉
| /// Note: This method should not be used outside testing, as it loses the | ||
| /// snapshot of the [`SessionState`] attached to this [`DataFrame`] and | ||
| /// consequently subsequent operations may take place against a different | ||
| /// state (e.g. a different value of `now()`) |
|
|
||
| /// Write this DataFrame to the referenced table by name. | ||
| /// | ||
| /// This method uses on the same underlying implementation |
There was a problem hiding this comment.
This line wasn't changed in this PR, but it caught my eye... it seems like there's an extra word?
| /// This method uses on the same underlying implementation | |
| /// This method uses the same underlying implementation |
There was a problem hiding this comment.
I missed this comment - will make a follow on PR
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
|
Thank you for the review @carols10cents 🙏 |
Which issue does this PR close?
Part of #7013
Rationale for this change
I was watching @carols10cents try to find how to write a parquet file via a
DataFramein the API docs and they left something to be desiredWhat changes are included in this PR?
DataFrame::write_json,write_csv,write_parquetAre these changes tested?
Covered by CI doc tests
Are there any user-facing changes?
Better docs