I use dataframe merge 3 times to get my desire results
def write_dips(writer):
df_dips = pd.read_excel(file_path, shee
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)