File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
datafusion/core/src/dataframe Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1937,7 +1937,17 @@ impl DataFrame {
19371937 ///
19381938 /// # Arguments
19391939 /// * `value` - Value to fill nulls with
1940- /// * `columns` - List of column names to fill. If empty, fills all columns
1940+ /// * `columns` - List of column names to fill. If empty, fills all columns.
1941+ ///
1942+ /// # Example
1943+ /// ```
1944+ /// // Example usage of fill_null:
1945+ /// let df = ctx.read_csv("tests/data/example.csv", CsvReadOptions::new()).await?;
1946+ /// // Fill nulls in only columns "a" and "c":
1947+ /// let df = df.fill_null(ScalarValue::from(0), vec!["a".to_owned(), "c".to_owned()])?;
1948+ /// // Fill nulls across all columns:
1949+ /// let df = df.fill_null(ScalarValue::from(0), vec![])?;
1950+ /// ```
19411951 pub fn fill_null (
19421952 & self ,
19431953 value : ScalarValue ,
You can’t perform that action at this time.
0 commit comments