kosiew commented on code in PR #14769: URL: https://github.com/apache/datafusion/pull/14769#discussion_r1967089979
########## datafusion/core/src/dataframe/mod.rs: ########## @@ -1926,6 +1930,71 @@ impl DataFrame { plan, }) } + + /// Fill null values in specified columns with a given value + /// If no columns are specified, applies to all columns + /// Only fills if the value can be cast to the column's type + /// + /// # Arguments + /// * `value` - Value to fill nulls with + /// * `columns` - Optional list of column names to fill. If None, fills all columns + pub fn fill_null( + &self, + value: ScalarValue, + columns: Option<Vec<String>>, + ) -> Result<DataFrame> { + let cols = match columns { + Some(names) => self.find_columns(&names)?, + None => self Review Comment: I was following the Pandas convention, where no limits (columns) means fill_null for all columns https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.fillna.html <img width="749" alt="image" src="https://github.com/user-attachments/assets/c4eab1eb-f1d2-4133-90c3-0a2c57b0349d" /> I could amend to no op as well if this is the preferred convention -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org