let pl.Expr.reshape optionally take a tuple or 2 scalars rather than just a tuple #19034
Labels
enhancement
New feature or an improvement of an existing feature
needs decision
Awaiting decision by a maintainer
Description
Most methods in polars (
with_columns
,select
,group_by
, etc) take *args and are flexible to using that or inputting a Sequence.reshape
is the outlier in that it specifically requires a tuple. Most times, for me anyway, I just want the rows to be inferred so it'd be nicer to dopl.col('a').reshape(width)
rather thanpl.col('a').reshape((width, -1))
. In comparison to numpy, its reshape accepts an int as the shape not just a tuple.I'd like to redefine the function to
The text was updated successfully, but these errors were encountered: