if column name has certain value take mean of all these columns python code example Example: calculating mean for pandas column df["columnName"].mean()