Filtering a dataset

‘type’ , “cat”
&
‘type’ , “dog”
to
‘name’ , “cat”
‘name’ , “dog”