It is narrated from Abu Qatadah Ansari (may Allah be pleased with him) that the Prophet ﷺ (sometimes) would pray and he would be carrying Umamah bint Abi Al-As, and she was the granddaughter of the Messenger of Allah ﷺ. When he would prostrate, he would put her down, and when he stood up, he would pick her up.
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 322
Hadith Takhrijاخرجه البخاري : الصلاة، باب اذا حمل جارية صغيرة على عنقه في الصلاة: 516 ـ ومسلم، المساجد، باب جواز حمل الصبيان في الصلاة وان جيابهم محمولة على الطهارة..... الخ 543۔