calget mean maximum of a column in a dataframe code example Example: max of two columns pandas df["C"] = df[["A", "B"]].max(axis=1)