Mahrez moved to the Etihad Stadium from Leicester City during the summer transfer window.
The Algerian has been a substitute in three of City's last four Premier League matches, however, and has struggled to make his mark in the early stages of the 2018-19 campaign.
Guardiola has compared Mahrez's struggles to those of Bernardo Silva in the early stages of his City career, and has insisted that the attacker will come good.
"Sometimes we need more time. It has happened a little bit with Riyad. It is going to happen in the future. Riyad is going to come back the same like we saw when he was with Leicester and with Bernardo right now," Guardiola told reporters.
"In the beginning it was a little bit difficult for Bernardo. He came from France — and even for me [when I arrived in 2016] I needed a period to know, to understand everything about the way we wanted to play and in the way that we are aggressive without the ball."
City will open their 2018-19 Champions League campaign at home to Lyon on Wednesday night.