def test_02(self): df_test = pd.DataFrame({ 'A': ['A2', 'A3', 'A4', 'A5'], 'B': ['B2', 'B3', 'B4', 'B5'] }) df = data_frame(list('AB'), range(2, 6)) self.assertTrue(df.equals(df_test), "!")
def test_06(self): df_test = pd.DataFrame({ 'A': ['A0', 'A1', 'A2', 'A3'], 'B': ['B0', 'B0', 'B2', 'B2'], 'C': ['C1', 'C3', 'C5', 'C7'] }) df = data_frame(list('ABC'), [range(4), list('0022'), [1, 3, 5, 7]]) self.assertTrue(df.equals(df_test), "!")
def test_01(self): df_test = pd.DataFrame({ 'A': ['A0', 'A1', 'A2', 'A3'], 'B': ['B0', 'B1', 'B2', 'B3'], 'C': ['C0', 'C1', 'C2', 'C3'], 'D': ['D0', 'D1', 'D2', 'D3'] }) df = data_frame(list('ABCD'), range(4)) self.assertTrue(df.equals(df_test), "!")
def test_07(self): df_test = pd.DataFrame({ 'X': ['A1', 'A2', 'A3', 'A4'], 'Y': ['B0', 'B0', 'B2', 'B2'], 'Z': ['C1', 'C3', 'C5', 'C7'] }) df = data_frame(list('ABC'), [range(1, 5), list('0022'), [1, 3, 5, 7]], columns=list('XYZ')) self.assertTrue(df.equals(df_test), "!")
def test_05(self): df_test = pd.DataFrame( { 'X': ['A2', 'A3', 'A4', 'A5'], 'Y': ['B2', 'B3', 'B4', 'B5'] }, index=list('pqrs')) df = data_frame(list('AB'), range(2, 6), index=list('pqrs'), columns=list('XY')) self.assertTrue(df.equals(df_test), "!")