max of two columns pandas
df["C"] = df[["A", "B"]].max(axis=1)
max of two columns pandas
df["C"] = df[["A", "B"]].max(axis=1)
find min and max from dataframe column
max_value = column.max()
Concatenating two DataFrames, and then finding the Maximum value
from pandas import DataFrame
Data1 = {'Set1': [55,22,11,77,33]}
df1 = DataFrame(Data1, columns= ['Set1'])
Data2 = {'Set2': [23,45,21,73,48]}
df2 = DataFrame(Data2, columns= ['Set2'])
Concatenated = df1['Set1'].map(str) + df2['Set2'].map(str)
df_combined = DataFrame(Concatenated, columns=['Combined Values'])
max1 = df_combined['Combined Values'].max()
print (max1)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us