我有两个数据帧字典,对于每个键,我希望基于公共列合并数据帧。因此,我考虑创建一个字典并在循环中合并数据帧,以下是我的代码示例:for (keys1,keys2) in zip(dict_1.keys(),dict_2.keysTotal_data_dict["Total_%s" %keys1]=pd.merge(dict_1[keys1],
我正在尝试合并两个都有'product_desc‘列的数据帧。我使用的是Pandas 0.13和Python 2.7。small_df = pd.merge(small_df, linregress_df, on = 'product_desc', how = 'left')pandas.core.index.InvalidIndexError: Reindexing only valid wi