The 29-year-old spent two years at the Etihad Stadium under the tutelage of Guardiola, winning five trophies including two Premier League titles and one FA Cup.
Danilo believes Pirlo shares similar ideas with the former Barcelona and Bayern Munich manager.
The former Real Madrid man has rediscovered his old form under Pirlo in Turin, playing in a three-man defense.
“I am a defender, it doesn’t matter where I play, but I am happy to be in this different role at Juve this season,” he told GloboEsporte.
“The most important thing in football is the way you occupy the space, making the right movement at the right time. I was at times a left-back at Real Madrid, while at Manchester City I played in every defensive role and even occasionally in midfield, but I consider myself a defender.
“Because the fixture list is so packed and there isn’t much time for training, video lectures were fundamental for us to prepare both attacking and defensive movements.
“Pirlo has a similar idea to the role I played at Manchester City during my two years there, so it’s a position I already know and was accustomed to. With my general reading of the game, I can help the team by playing out from the back.”
He added: “I feel satisfied with this moment of my career, my life and the maturity I have reached at Juventus. I spend a lot of time with Nedved, we sometimes sit down for coffee and I think: ‘I’m having coffee with Nedved!’
“We talk about football and it’s great to have someone like that around. Pirlo still acts a bit like a player, but has already given a sense of leadership to the Juventus squad and it’s important for a coach to win over the group, so they’ll follow his ideas of football.
“The other day, he stayed behind to take a few free kicks, so I was the first to sit down and watch. Considering everything he did as a player, we should just listen and observe. He was one of the greatest.”