Answers for "pandas max value between two columns"

1

max of two columns pandas

df["C"] = df[["A", "B"]].max(axis=1)
Posted by: Guest on November-12-2020
1

find min and max from dataframe column

max_value = column.max()
Posted by: Guest on August-29-2020
0

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)
Posted by: Guest on June-18-2020

Code answers related to "pandas max value between two columns"

Python Answers by Framework

Browse Popular Code Answers by Language