The laceration to the knuckle of his right ring finger is not expected to keep him out of the lineup when the Marlins resume play after the All-Star break on Friday.
But the incident clearly upset manager Ozzie Guillen, who has backed Ramirez since the day he was hired as manager.
"It was a stupid injury, too," Guillen said. "Very immature. You're going to hurt yourself because you can't hit? Good hitters don't do that. Good hitters battle back and try to get better. When you make an out and you hit something, you don't just hurt yourself, you hurt the ballclub.
"He hit something out there. I think he hit the fan or something."
Leading off the sixth inning, Ramirez grounded out sharply to second baseman Skip Schumaker, who threw to first for the out.
Ramirez was replaced by Donovan Solano at third base in the bottom of the inning.
"I just got mad," Ramirez said. "I haven't been good all year long, and I just got mad. It hurts everybody. It hurts me. I will be back Friday. Nothing is going to keep me off the field or from playing."
Solano's spot in the order came up in the ninth inning, but with the bases full, the rookie struck out looking against Mitchell Boggs. The Cardinals rallied from two runs down, scoring three times off Heath Bell in the ninth to claim a 5-4 win.
"That makes me mad," Guillen said. "Players get hurt like that for no reason, hitting stuff. I'm not going to say unprofessional. But very childish. We're not kids. We're grown people. When you struggle, and you're a great player, you've got to try to get better and not hurt the ballclub. We'll see how he is doing on Friday."
The veteran third baseman enters the All-Star Break with a .248 batting average, with 12 home runs and 44 RBIs.
"I think, for me, I'm just struggling right now," Ramirez said. "I'm not frustrated at all. I just got mad. I know I can do better than that. It's going to happen."
Guillen said he was so disappointed he didn't ask Ramirez how many stitches he received.
Ramirez had a walk, two stolen bases and a run scored in the first inning on Sunday. But on the road trip, he was 2-for-22, last getting a hit on July 4, when he drove in the game-winning run in the 10th inning at Milwaukee.
"We built this ballclub around him," Guillen said. "We keep saying this is the main man on this ballclub. I never criticize Hanley Ramirez for not having the season we thought he was going to have. But I will criticize him for doing what he did, because he's hurting the ballclub, he's not hurting himself.
"I know that's part of the game. I know, I've played baseball before. When I was angry, I was throwing stuff, too. But when you hurt yourself like that, you've got to think about you hurt the ballclub, too."