Max Of Two Columns Pandas Code Example

Snippet 1

  df["C"] = df[["A", "B"]].max(axis=1) 

Snippet 2

  max_value_column = df["column_name"].max() 

Copyright © Code Fetcher 2020

 

 

Leave a comment

Your email address will not be published. Required fields are marked *