Dataframe merge gives `Process finished with exit code 137 (interrupted by signal 9: SIGKILL)`

后端 未结 1 1164
傲寒
傲寒 2021-01-23 17:09

I use dataframe merge 3 times to get my desire results

def write_dips(writer):
    df_dips = pd.read_excel(file_path, shee         


        
1条回答
  •  一向
    一向 (楼主)
    2021-01-23 17:28

    I overcame by using fillna(0) at each merge.

    def write_dips(writer):
        df_dips = pd.read_excel(file_path, sheet_name='DipsSummary')
        df_sales = pd.read_excel(file_path, sheet_name='SaleSummary')
        df_delivery = pd.read_excel(file_path, sheet_name='DeliverySummary')
        df_mapping = pd.read_csv(mappingfilepath, delimiter=',', skiprows=[1])
    
    df_dips = df_dips.merge(df_mapping, left_on='Site', right_on='SHIP TO NAME',how='left').fillna(0)
    df_dips = df_dips.merge(df_sales, left_on ='IDASS ID', right_on='IdassId',how='left').fillna(0)
    df_dips = df_dips.merge(df_delivery, left_on='SHIP-TO PARTY', right_on='Ship-To Party', how='left').fillna(0)
    

    0 讨论(0)
提交回复
热议问题