1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020) # LAB 12-4 ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î concat Àû¿ëÇØ º¸±â, 330ÂÊ # import pandas as pd df_1 = pd.DataFrame( {'A' : ['a10', 'a11', 'a12'], 'B' : ['b10', 'b11', 'b12'], 'C' : ['c10', 'c11', 'c12']} , index = ['°¡', '³ª', '´Ù'] ) df_2 = pd.DataFrame( {'B' : ['b23', 'b24', 'b25'], 'C' : ['c23', 'c24', 'c25'], 'D' : ['d23', 'd24', 'd25']} , index = ['´Ù', '¶ó', '¸¶'] ) print( pd.concat( [df_1, df_2] , axis = 0, join = 'outer' ) ) print( pd.concat( [df_1, df_2] , axis = 0, join = 'inner' ) ) print( pd.concat( [df_1, df_2] , axis = 1, join = 'outer' ) ) print( pd.concat( [df_1, df_2] , axis = 1, join = 'inner' ) ) | cs |