News for hackers. Stuff that matters.
Re:Modern Polars: an extensive side-by-side comparison of Po... by porker on Sunday January 08, 2023 @03:44AM (#34297255)
> f.loc[f['a'] <= 3, "b"] = f['b']

Why isn't that saying to assign the value of column b to these locations? Reading the code (and not being a Pandas user) I expected it to be

f.loc[f['a'] <= 3, "b"] = f['a']

Also the "// 10" comment is most confusing as looking at the result it matches 10, 20 & 30 in column b and replaces them with the matching values from column a

Re:Modern Polars: an extensive side-by-side comparison of Po... by 149764 on Sunday January 08, 2023 @03:56AM (#34297327)
In python // is integer division, comments start with #.
Re:Modern Polars: an extensive side-by-side comparison of Po... by porker on Sunday January 08, 2023 @04:54AM (#34297649)
Boy I feel stupid. Thanks for setting me straight.