-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Milestone
Description
Hi! There is a very confusing error thrown in some cases with mixed types.
A minimal example:
df = DataFrame(a=1:1)
df |>
@mapmany([(c=Inf,), (c=1,)], (; _..., b=__)) |>
@groupby({_.b}) |>
@map((; key(_)..., a=_.a))throws type NamedTuple has no field a on the last line with @map. This is due to c having type Float in one row, and Int in another. When all values have the same type, the same code works:
df = DataFrame(a=1:1)
df |>
@mapmany([(c=0,), (c=1,)], (; _..., b=__)) |> # changed Inf to 0
@groupby({_.b}) |>
@map((; key(_)..., a=_.a))Julia 1.2.0, Query v0.12.1.