It is narrated from Abu Qatadah Ansari (may Allah be pleased with him) that the Messenger of Allah (peace be upon him) would sometimes lead the people in prayer while carrying Umamah bint Zainab (may Allah be pleased with her). When he (peace be upon him) would go into prostration, he would put her down, and when he stood up, he would pick her up.
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 321
Hadith Takhrijاخرجه مسلم المساجد، باب جواز حمل الصبيان في الصلاة .... الخ: 543 - والبخاري: الأدب، باب رحمة الوالد و تقبيله ومعانقته : 5996۔