Q. Explain the transform dataframe function.


Answer :-

The transform function transforms the aggregate data by repeating summary result for each row in the group and making the result having the same shape as that of the original data.


For example :-

df1.groupby (by = 'Tutor') ['Classes'].transform(np.mean)

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post