lib/polars/lazy_frame.rb in polars-df-0.1.3 vs lib/polars/lazy_frame.rb in polars-df-0.1.4
- old
+ new
@@ -556,11 +556,11 @@
# "foo" => [1, 2, 3],
# "bar" => [6, 7, 8],
# "ham" => ["a", "b", "c"]
# }
# ).lazy
- # lf.filter(Polars.col("foo") < 3).collect()
+ # lf.filter(Polars.col("foo") < 3).collect
# # =>
# # shape: (2, 3)
# # ┌─────┬─────┬─────┐
# # │ foo ┆ bar ┆ ham │
# # │ --- ┆ --- ┆ --- │
@@ -908,11 +908,11 @@
# ).lazy
# ldf.with_columns(
# [
# (Polars.col("a") ** 2).alias("a^2"),
# (Polars.col("b") / 2).alias("b/2"),
- # (Polars.col("c").is_not()).alias("not c")
+ # (Polars.col("c").is_not).alias("not c")
# ]
# ).collect
# # =>
# # shape: (4, 6)
# # ┌─────┬──────┬───────┬──────┬──────┬───────┐
@@ -1254,11 +1254,15 @@
# # └─────┴─────┘
def take_every(n)
select(Utils.col("*").take_every(n))
end
- # def fill_null
- # end
+ # Fill null values using the specified value or strategy.
+ #
+ # @return [LazyFrame]
+ def fill_null(value = nil, strategy: nil, limit: nil, matches_supertype: nil)
+ select(Polars.all.fill_null(value, strategy: strategy, limit: limit))
+ end
# Fill floating point NaN values.
#
# @param fill_value [Object]
# Value to fill the NaN values with.