A PyQT GUI application for converting InfoLease report outputs into Excel files. Handles parsing and summarizing. Learns where files are meant to be store and compiles monthly and yearly summaries.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InfoLeaseExtract/venv/Lib/site-packages/pandas/tests/frame/methods/test_swapaxes.py

22 lines
664 B

import numpy as np
import pytest
from pandas import DataFrame
import pandas._testing as tm
class TestSwapAxes:
def test_swapaxes(self):
df = DataFrame(np.random.randn(10, 5))
tm.assert_frame_equal(df.T, df.swapaxes(0, 1))
tm.assert_frame_equal(df.T, df.swapaxes(1, 0))
def test_swapaxes_noop(self):
df = DataFrame(np.random.randn(10, 5))
tm.assert_frame_equal(df, df.swapaxes(0, 0))
def test_swapaxes_invalid_axis(self):
df = DataFrame(np.random.randn(10, 5))
msg = "No axis named 2 for object type DataFrame"
with pytest.raises(ValueError, match=msg):
df.swapaxes(2, 5)