-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor: Improve DataFrame
docs, add examples
#9159
Conversation
/// ).await?; | ||
/// # Ok(()) | ||
/// # } | ||
/// ``` | ||
pub async fn write_parquet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this example!
@@ -1025,6 +1107,7 @@ impl DataFrame { | |||
} | |||
|
|||
/// Write this DataFrame to the referenced table by name. | |||
/// | |||
/// This method uses on the same underlying implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this comment - will make a follow on PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
Thank you for the review @carols10cents 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work thanks @alamb
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
DataFrame
in the API docs and they left something to be desiredWhat changes are included in this PR?
DataFrame::
write_json
,write_csv
,write_parquet
Are these changes tested?
Covered by CI doc tests
Are there any user-facing changes?
Better docs