KANSAS CITY, Mo. — The shortstop who plays across town from Amed Rosario might serve as the best example of a player at his position who figured it out during a season and became a star.

Didi Gregorius was 25 years old, in his third major league season, when the transformation began with the Yankees. Gregorius went from a below-average offensive player in the first half of 2015 with a .619 OPS, to something more special. In the final 74 games of that season, he posted a .762 OPS in a coming-out of sorts. He has been among the game’s best shortstops since.

Now the Mets could be witnessing a similar blossoming with the 23-year-old Rosario, who is among the National League’s hottest hitters. He entered Friday’s game against the Royals with a .948 OPS over his past 30 games. In his first 87 games this season, Rosario posted a .713 OPS.

“That is a good analogy,” manager Mickey Callaway said, when presented with the Gregorius-Rosario comparison.

As a coordinator in Cleveland’s minor league system before ascending to major league pitching coach, Callaway was around Gregorius — who came up with the Reds — at spring training in Goodyear, Ariz., where the two organizations shared a minor league complex.

“Being so close to Didi in spring training, I got to see a lot of him,” Callaway said. “He did a steady climb and then you really didn’t know how good he could be. You saw the potential and then his first couple of years in the big leagues [with the Diamondbacks], he was solid, but then it was a whole different level and I think that is a good comparison.

“Rosie is really starting to show the power, the ability to hit for average, the defense, it’s all coming along. That’s what happens when you become a regular major league player and you hit a certain age and start getting more confidence and mature a little bit and Rosie has done a great job.”

Rosario went 5-for-6 a night earlier to become the sixth player in franchise with at least four hits in consecutive games. The Mets saw a glimpse of what Rosario could become last season — albeit not at this level — over his final 50 games with a plate appearance, in which he hit .294 with five homers. But that burst didn’t sustain.

“It’s been pretty [similar] to what happened last year compared to this year is my confidence has been at an all-time high,” Rosario said through an interpreter. “I didn’t start the season off great, but now it’s going well.”

Todd Frazier, a teammate of Gregorius’ briefly with the Yankees, sees similarities in Rosario’s rise, but cautions there are differences in the two circumstances: Rosario didn’t carry the burden of replacing a legend such as Derek Jeter.

“The pressure is different on that side because of the prestige of Derek Jeter,” Frazier said. “I think Rosie is coming into his own just because he is finally understanding his capabilities. It takes time sometimes to get your swing right in the major leagues. In the minor leagues you can kind of get away with it. But his approach has been outstanding, whether it has been with two strikes or not.

“I don’t think the pressure is there. I just think he’s understanding where he’s at in his swing. And his swing path is unbelievable, he is focused on hitting the ball the other way and then he reacts to off-speed pitches. We need him, this is big. He has to be our culprit at the top of the order now and he’s stepped in real nice.”