I have two dataframes with thousands of rows, I need to combine both into one dataframe without duplicate and reversion. for example:
Dataframe 1
drug1
drug2
drug3
Dataframe 2
disease1
disease2
disease3
So, the output dataframe will be:
output-dataframe
drug1 disease1
drug1 disease2
drug1 disease3
drug2 disease1
drug2 disease2
drug2 disease3
drug3 disease1
drug3 disease2
drug3 disease3
I don't want the output combination containing something like:
disease1 drug1
drug1 drug1
disease1 disease1
I actually try it using pd.merge
but it return duplicate and reversion and also took long time because I have thousands in Dataframes 1 and 2
Any help please ?