Iterating through rows in julia Dataframe

df1=DataFrame(p1 = [1, 2, 3],p2 = [1,2,3])

df2=DataFrame(q1 = [1, 2, 3 ],q2 = [3,7,9])

df3=DataFrame(r1 = [0,1],r2 = [1,1])

datas=Dict()

for data1 in eachrow(df1)
    for data2 in eachrow(df2)
        for data3 in eachrow(df3)

            if data1[1]==data2[1]==data3[1]
                datas[data1[1]]="data1[2]"*"data1[2]"*"data3[2]"

            elseif data1[1]==data2[1]!=data3[1]
                datas[data1[1]]="data1[2]"*"data2[2]"

            elseif  data1[1]==data3[1]!=data2[1]
                datas[data1[1]]="data1[2]"*"data2[2]"

            elseif data2[1]!=data3[1]!=data1[1]
                datas[data2[1]]="data2[2]"*"data3[2]"

            elseif data1[1]!=data3[1]!=data2[1]
                datas[data1[1]]="data1[2]"
                datas[data2[1]]="data2[2]"
                datas[data3[1]]="data3[2]"
        
            end 
        end           
    end 
end

I am not sure whether zip can used for different length of data frames? (as it will iterate only until anyone ends)

Could someone suggest a better way to do this . There can be case that df3 can be zero.

As I am not sound enough to append the values to dictionary using !haskey.

It would be really helpful if some one guide with a solution