drop("has_match") df = matched_rows.join(stock_market_orders, how="cross") # filter based on our join condition df = df.filter(col("market_date") > col("order_date")) # concatenate the unmatched with the filtered result for our final answer df = pl.concat((nonmatched_rows, df)...
filtering and sorting rows whereas the previous chapter was about columns, this chapter is all about the rows in a dataframe. how can rows be sorted or discarded based on some condition. again, we’re going to demonstrate the various functions by using real-world datasets. filtering context ...
(c, str) else {x: dtype for x in expand_selector(self, c)} # type: ignore[arg-type] ) return self._from_pyldf(self._ldf.cast(cast_map, strict)) def clear(self, n: int = 0) -> LazyFrame: """ Create an empty copy of the current LazyFrame, with zero to 'n' rows. ...