Take her! She needs to say goodbye, she needs closure. She is old enough to understand (at least that she won't see her again). My neice and nephew were 2 and 4 when my grandma died. My sister took them to the funeral even though her husband was very much against it. It was the best thing for the kids. They were close to her and saw her almost everyday (she lived next door). At the funeral, they learned that funerals are sad, but also joyous and fun because people celebrate the person's life. They learned to laugh in the midst of sadness as people told jokes and funny stories about her life. During the funeral, they walked up to the casket, saw her one last time and said goodbye.
In the days and weeks to follow, they would occassionaly ask to go see their great-grandma - especially the 2 year old. My sister would just gently remind them that they had said goodbye to her. They would get a sad look for a second, say "oh yeah", and go on with their day.
Fast forward a year to when a grandma on their dad's side died. He refused to let them go to the viewing or the funeral. They never got to say goodbye.... even though they were a year old, they were still asking to see her a year later!
Death is a hard topic but we can't shild our kids from it forever. They need to understand. Understanding at an early age makes it easier for them to comprehend such topics like "don't play with guns or someone might die".... they know it's serious then.