I have a huge excel file, like that:
Table 1
my desire Table is like:
my dsire Table
I use group by, count and sum like :
import pandas as pd
import openpyxl as op
from openpyxl import load_workbook
from openpyxl import Workbook
import numpy as np
path1 = r"users.xlsx"
data = pd.read_excel(path1, engine='openpyxl')
df = pd.DataFrame(data)
NumberOfChild = df.groupby('Parent ID')['Parent ID'].count().to_frame('Employees Number')
NumberOfBooking = df.groupby('Parent ID')['Reservations Count'].transform('sum')
that gives me right number of Booking and Child, but i can't these value in the Columns numberOfChild and numberOfBooking