I have an integer n=3
I have to create a square matrix
with below condition when matrix[row]=matrix[column] then 1 else 0
My plan is to create a table, insert n number of rows with all nulls initially and write an update with the above case statement in pandas sql.
Can anyone please help on this case to create a dataframe initially with n rows and n columns dynamically?
Thank you.