Example #1
0
 def test_swapaxes(self):
     df = DataFrame(np.random.randn(10, 5))
     assert_frame_equal(df.T, df.swapaxes(0, 1))
     assert_frame_equal(df.T, df.swapaxes(1, 0))
     assert_frame_equal(df, df.swapaxes(0, 0))
     self.assertRaises(ValueError, df.swapaxes, 2, 5)