1. 內連接
2. 左連接
3. 右連接
portdas as pd
創建兩個數據表e({'key' ['', 'B', 'C', 'D'],
'value' [1, 2, 3, 4]})e({'key' ['B', 'D', 'E', 'F'],
'value' [5, 6, 7, 8]})
內連接nerergener')tner)
左連接erge='key', how='left')t(df_left)
右連接erge='key', how='right')t(df_right)
1. 內連接
2. 左連接
3. 右連接
portdas as pd
創建兩個數據表e({'key' ['', 'B', 'C', 'D'],
'value' [1, 2, 3, 4]})e({'key' ['B', 'D', 'E', 'F'],
'value' [5, 6, 7, 8]})
內連接nerergener')tner)
左連接erge='key', how='left')t(df_left)
右連接erge='key', how='right')t(df_right)