@@ -941,7 +941,7 @@ def write_csv(
941941 with_header: If true, output the CSV header row.
942942 write_options: Options that impact how the DataFrame is written.
943943 """
944- self .df .write_csv (str (path ), with_header , write_options = write_options )
944+ self .df .write_csv (str (path ), with_header , write_options . _raw_write_options )
945945
946946 @overload
947947 def write_parquet (
@@ -1014,7 +1014,10 @@ def write_parquet(
10141014 compression_level = compression .get_default_level ()
10151015
10161016 self .df .write_parquet (
1017- str (path ), compression .value , compression_level , write_options
1017+ str (path ),
1018+ compression .value ,
1019+ compression_level ,
1020+ write_options ._raw_write_options ,
10181021 )
10191022
10201023 def write_parquet_with_options (
@@ -1071,7 +1074,7 @@ def write_parquet_with_options(
10711074 str (path ),
10721075 options_internal ,
10731076 column_specific_options_internal ,
1074- write_options ,
1077+ write_options . _raw_write_options ,
10751078 )
10761079
10771080 def write_json (
@@ -1085,7 +1088,7 @@ def write_json(
10851088 path: Path of the JSON file to write.
10861089 write_options: Options that impact how the DataFrame is written.
10871090 """
1088- self .df .write_json (str (path ), write_options = write_options )
1091+ self .df .write_json (str (path ), write_options = write_options . _raw_write_options )
10891092
10901093 def write_table (
10911094 self , table_name : str , write_options : DataFrameWriteOptions | None = None
@@ -1096,7 +1099,7 @@ def write_table(
10961099 Not all table providers support writing operations. See the individual
10971100 implementations for details.
10981101 """
1099- self .df .write_table (table_name , write_options )
1102+ self .df .write_table (table_name , write_options . _raw_write_options )
11001103
11011104 def to_arrow_table (self ) -> pa .Table :
11021105 """Execute the :py:class:`DataFrame` and convert it into an Arrow Table.
@@ -1275,11 +1278,11 @@ def __init__(
12751278 """Instantiate writer options for DataFrame."""
12761279 write_options = DataFrameWriteOptionsInternal ()
12771280 if insert_operation is not None :
1278- write_options = write_options .with_insert_operation (insert_operation )
1281+ write_options = write_options .with_insert_operation (insert_operation . value )
12791282 write_options = write_options .with_single_file_output (single_file_output )
12801283 if partition_by is not None :
12811284 if isinstance (partition_by , str ):
1282- partition_by = [single_file_output ]
1285+ partition_by = [partition_by ]
12831286 write_options = write_options .with_partition_by (partition_by )
12841287
12851288 sort_by_raw = sort_list_to_raw_sort_list (sort_by )
0 commit comments