timsaucer commented on code in PR #1763:
URL:
https://github.com/apache/datafusion-python/pull/1763#discussion_r4124536559
##########
python/datafusion/dataframe.py:
##########
@@ -1875,6 +1924,34 @@ def fill_null(self, value: Any, subset: list[str] | None
= None) -> DataFrame:
"""
return DataFrame(self.df.fill_null(value, subset))
+ def fill_nan(self, value: float, subset: list[str] | None = None) ->
DataFrame:
+ """Fill NaN values in floating-point columns with a value.
+
+ Only floating-point columns are changed; others are kept unchanged, as
is
+ any column ``value`` cannot be cast to. NaN is distinct from null,
which
+ :py:meth:`fill_null` handles.
+
+ Args:
+ value: Value to replace NaN with. Will be cast to match column
type.
+ subset: Optional list of column names to fill. If None, fills all
Review Comment:
Fixed in 8454a099: `fix: treat an empty fill_null or fill_nan subset as no
columns`
##########
python/datafusion/user_defined.py:
##########
@@ -388,7 +397,7 @@ def wrapper(*args: Any, **kwargs: Any) -> Callable:
return decorator
- if hasattr(args[0], "__datafusion_scalar_udf__"):
+ if hasattr(args[0], "__datafusion_scalar_udf__") or
_is_pycapsule(args[0]):
Review Comment:
Fixed in f8d7b70f: `fix: allow the keyword-only form of the udf, udaf, and
udwf decorators`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]