File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -234,4 +234,22 @@ impl PyDataFrame {
234234 let new_df = self . df . except ( py_df. df ) ?;
235235 Ok ( Self :: new ( new_df) )
236236 }
237+
238+ /// Write a `DataFrame` to a CSV file.
239+ fn write_csv ( & self , path : & str , py : Python ) -> PyResult < ( ) > {
240+ wait_for_future ( py, self . df . write_csv ( path) ) ?;
241+ Ok ( ( ) )
242+ }
243+
244+ /// Write a `DataFrame` to a Parquet file.
245+ fn write_parquet ( & self , path : & str , py : Python ) -> PyResult < ( ) > {
246+ wait_for_future ( py, self . df . write_parquet ( path, None ) ) ?;
247+ Ok ( ( ) )
248+ }
249+
250+ /// Executes a query and writes the results to a partitioned JSON file.
251+ fn write_json ( & self , path : & str , py : Python ) -> PyResult < ( ) > {
252+ wait_for_future ( py, self . df . write_json ( path) ) ?;
253+ Ok ( ( ) )
254+ }
237255}
You can’t perform that action at this time.
0 commit comments