In DF, I have two columns (let’s call them A and B) with A having repeats, both are categorical variables. I am trying to show only the unique A rows with their corresponding B values, how can I do that?
I was able to do it when B is a continuous var by using this:
by(ptable, [:A], df -> mean(df[:B]))