Daft icon indicating copy to clipboard operation
Daft copied to clipboard

Floor/integer division

Open Vince7778 opened this issue 8 months ago • 1 comments

Add support for floor division of integers (// operator). Currently you would have to do true division, floor it, then cast from float to int. This is unwieldy and may have precision issues.

Example:

df = daft.from_pydict({"a": [4, 6, 9], "b": [2, 4, 4]})
df = df.select(df["a"] // df["b"])
# should output [2, 1, 2]

Vince7778 avatar Jun 19 '24 18:06 Vince7778