concatenate values of two dataframe columns code example

Example 1: 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)

Example 2: how to merge two column pandas

DataFrame["new_column"] = DataFrame["column1"] + DataFrame["column2"]