Speaking to The Guardian, Danilo, 33, lauded his former manager for the experience he had while with the Premier League side.
Danilo said: “Pep Guardiola educates his players.
"That’s the most important thing about his work. He makes all players think about football in the same way. Time, space, movement, possession, taking care of the ball.
“He makes you understand the spaces on the pitch like no other coach and he lives the game emotionally like no other coach. I was brainwashed by Guardiola, but in a good way. It was like I was at university.
“What I experienced with him allowed me to raise my level and keep that level to this day.
"It’s not that I was an idiot before I arrived at Manchester City but I realised that I played football in completely the wrong way.
“If I had met him before, he would have made my life a lot easier. I’m so glad I was able to play under him and was able to learn from him.”
The defender currently plies his trade in Brazil, joining Flamengo on a free transfer from Juventus in January.