krangl
krangl copied to clipboard
Improve error message for unnest with empty list
Reduced test case: dataFrameOf("a", "b")(listOf<Int>(), 1).unnest("a") fails with "Provided data does not coerce to tabular shape"
It took me a while to figure out from a larger dataset that the empty list was the problem. I guess unnest could also be defined to unnest to zero rows in this case, but maybe that is too magical.
Not sure if unnesting to zero row dataframe is much better here. Do you know how dplyr handles this example?