Set diagonal values in a Dataframe
Set diagonal values in a Dataframe Question: Similar questions have been asked already but I still can’t come up with a solution. I have a pandas Dataframe of such a shape: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 -1 0 0 0 …