By the time the game ended on Friday, Dansby Swanson’s one mistake was overshadowed by all of the ways he helped the Braves beat the Nationals.

The rookie shortstop hit a two-run homer to give the Braves a lead, reached base three other times and made a superlative play in the field during the 6-4 victory. Swanson has struggled early this season but making an impact on this game was the latest sign that he’s making progress.

“His game has come a long way since the beginning of the year, total game,” Braves manager Brian Snitker said. “And he’s learning on the job.”

Swanson went 2-for-2 with two walks against the Nationals and raised his batting average to .201. It’s the first time he’s been above the so-called Mendoza Line since the second game of the season.

“It’s one of those things put your head down and keep working and hopefully the results come,” Swanson said. “But at the same time I think it’s still really, really important to stay with the process. Still the most important thing is going about your business every day.”

Swanson homered in the second inning against Nationals lefty Gio Gonzalez to put the Braves ahead 2-0. He doubled in the sixth inning by taking second base when left fielder Jayson Werth lackadaisically scooped up his hit. Swanson walked in the fourth and seventh innings.

It’s the third multiple-hit game in the last five games for Swanson. In 17 games since April 29 Swanson has hit .298 with a .400 on-base percentage and .891 on-base plus slugging.

“’Dans’ you guys have got to remember he’s not 200 games into his professional career,” Braves pitcher R.A. Dickey said. “So he’s playing at a pretty high level, and he’s bringing what he brings every day. He’s going to make some mistakes. The hope is that he has the aptitude to learn from them and he listens to (coach) Ron Washington, who is just a fantastic infield coach, and just continues to get better. But he’s got the demeanor and the attributes to be good for a long time.”

Swanson’s mistake on Friday came in the third inning, after he’d hit his home run.

Trea Turner hit a chopper over the mound that Swanson charged and tried to grab barehanded. He didn’t touch it and the ball rolled into the outfield. Michael A. Taylor, running from second base, paused at third before sprinting home when he saw the ball get by Swanson.

“I don’t know that you are even going to get him with the bare hand right there,” Braves manager Brian Snitker said. “He’s trying to make a great play and probably pushed the envelope a little bit. But I am never going to fault a guy for make a great play.”

Said Swanson: “Looking back, obviously, it is one of those things you should just bite the bullet anyways and just glove it and live for another batter. It is something to learn from. Now I know. If you are going to do that you’ve at least got to touch it. You can’t just whiff.”

Later in the game Swanson made a play that Snitker called “freakin’ outstanding.”

Werth hit a grounder that Swanson tracked deep in the hole and backhanded before jumping to make a strong throw to first to get Werth.

“That’s one of my favorites, really,” Swanson said. “I work on it in batting practice, Snit will hit me some. I think it happens more than people think. You can never be prepared enough for things like that. It felt good.”

Swanson, 23, is a native of Marietta and the Braves’ top prospect. He had good results in 38 games after he got his first call-up last season.

Those factors, plus the team’s marketing of him as a draw to the new ballpark, put extra scrutiny on Swanson when he got off to a poor start this year. Swanson credited his teammates with offering him advice and encouraging him.

“The kid’s a stud, man.,” Braves catcher Kurt Suzuki said. “He’s a stud. Yeah, the numbers aren’t (indicating) what kind of player he is, but … (it’s good) seeing him, how positive he is, seeing how he works and how much he cares about the team. Not to mention the kid’s got skills, man.”