title: Getting non-diagonal elements in dataframe
body: <p>Following <a href="https://stackoverflow.com/questions/37310264/pandas-dataframe-diagonal">pandas DataFrame diagonal</a>, I can get diagonal elements using <code>np.diag</code>. How can I get the non-diagonal elements in a dataframe (assuming that dataframe is size n x n)</p>