microsoft excel – Convert a list of tuples into a table with columns which have checkmarks based on one element of tuple

This is one of those things that would be easy to find tutorials on if I only knew what this kind of operation was called!

I’ve got a CSV that looks like this

Fruit,color
Apple,red
Apple,green
Apple,yellow
Banana,yellow
Pear,brown
Pear,green

I want a CSV that looks like this (rendered as a markdown table for convenience of the reader):

Fruit brown green yellow red
Apple N Y Y Y
Banana N N Y N
Pear Y Y N N

IOW, in this test case, the 2nd column of the CSV is an enumeration, and I want the values in that column to be “spread” across columns of the result becoming “column masks”.

Order of the enum columns in the output table doesn’t matter. Field values in the output table doesn’t matter (can be Y/N or Y/blank or anything that distinguishes present from absent. Headers don’t need to be present (as long as I can figure out which column is which in the output table).

I’m thinking Excel but I’m open to other commonly available tools. I suppose I could write an Awk script but I’m sure there’s some kind of UI way to do this in a few clicks in Excel, …

if only I knew what it was called!!! (It’s gotta be some kind of grouping/summary operation …)