Reshaping dataframe

No worries - as for your actual question I now understand a bit better, but don’t think I’ve got a better solution.

Your final filter call doesn’t work for me on DataFrames 1.3.2, Julia 1.7.2, but I can replicate your result using the (imo slightly clearer)

filter(r -> any(isequal("X"), r), udf)
1 Like