Skip to content

Commit

Permalink
Fix writing an avro file when a filename is passed to pl.to_avro(): f…
Browse files Browse the repository at this point in the history
…ixes #2689 (#2692)
  • Loading branch information
ghuls committed Feb 18, 2022
1 parent 65fca73 commit 641acd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py-polars/src/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ impl PyDataFrame {
s => return Err(PyPolarsEr::Other(format!("compression {} not supported", s)).into()),
};

let mut buf = get_file_like(py_f, false)?;
let mut buf = get_file_like(py_f, true)?;
AvroWriter::new(&mut buf)
.with_compression(compression)
.finish(&mut self.df)
Expand Down

0 comments on commit 641acd3

Please sign in to comment.