遇到此错误
valueError:无法将DataFrame与类型为
的实例合并
使用以下代码:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
contract = pd.read_csv('4.CONTRACT_0806.csv')
contractaff = pd.read_csv('5.CONTRACTAFFILIATE_0806.csv')
df1 = pd.DataFrame(contract)
df2 = pd.DataFrame(contractaff)
mergedf = pd.merge('df1','df2',how = 'outer',left_on=['CONTRACT_CONTRACT_ID'])
那是为什么?