Using Miller (https://github.com/johnkerl/miller) and sed
<input.csv sed -r 's|^(.+")(.?[0-9]+.+)$|\1 "\2"|g' | \
mlr --csv -N --ifs " " put 'if($1=~"xml") {$4=$1;$5=$2}' \
then unsparsify \
then fill-down -f 4,5 \
then count-similar -g 4 \
then filter '($1=~"xml" && $count==1) || ($1!=~"xml" && $count>1)' \
then reorder -f 4,5,1,2,3 \
then put 'if($2=~"Fru"){$1="";$2="";$3=""}' \
then cut -x -f count
you will have
+------------------------+--------------------------------------+--------------------+------------------+----------------------------------------+
| 0bef-82-46-8a-9a0b.xml | Fruits/Mango Apple /Plum cherry date | 0bef-82-46-8a-9a0b | 5da-0-ba-c1-1a9 | Fruits/Pear Banana/Plum orange mango |
| 0bef-82-46-8a-9a0b.xml | Fruits/Mango Apple /Plum cherry date | 0bef-82-46-8a-9a0b | ac-94-4ab-91-23 | Fruits/Pear Banana/Plum orange mango |
| 0bef-82-46-8a-9a0b.xml | Fruits/Mango Apple /Plum cherry date | 0bef-82-46-8a-9a0b | 5z-94-ab-92-2f3 | Fruits/Pear Banana/Plum orange mango |
| 952f-82-46-8a-9a0b.xml | Fruits/Mango | - | - | - |
| 3cff-82-46-8a-9a0b.xml | Fruits/Big Mango/Not Sweet | - | - | - |
| 6m0k-82-46-8a-9a0b.xml | Fruits/Big Pear/Very Sweet | - | - | - |
| 17a-42-df-c24.xml | Fruits Market/Big Apple/Sweet | 17a-42-df-c24 | 54-ba-4411-9-3d8 | Veg/Radish /Radish Carrot Celery Onion |
| 17a-42-df-c24.xml | Fruits Market/Big Apple/Sweet | 17a-42-df-c24 | 2da5-0-4a-b1-e89 | Veg/Radish /Radish Carrot Celery Onion |
| 17a-42-df-c24.xml | Fruits Market/Big Apple/Sweet | 17a-42-df-c24 | b7-94-4db-92-2f3 | Veg/Radish /Radish Carrot Celery Onion |
| 17a-42-df-c24.xml | Fruits Market/Big Apple/Sweet | 17a-42-df-c24 | 4d-67c-446-b5-ac | Veg/Radish /Radish Carrot Celery Onion |
| 17a-42-df-c24.xml | Fruits Market/Big Apple/Sweet | 17a-42-df-c24 | 2-8b-4det-87-769 | Veg/Radish /Radish Carrot Celery Onion |
+------------------------+--------------------------------------+--------------------+------------------+----------------------------------------+