The best way to add pineapple to this carrot cake is to replace the raisins with dried pineapple cubes. I would be cautious about adding fresh pineapple or tinned pineapple as the carrots already add a lot of moisture and so it would be more difficult for the cake to cook properly. So, I recommend dried pineapple. If you like pineapple in carrot cake, you might like my Tropical Carrot Cake recipe!