-1
avg_weight = df.pivot_table(index = "Item_Identifier",values = "Item_Weight")
df_bool =df[df["Item_Weight"].isnull()]
df.loc[df_bool,'Item_Weight'] = df.loc[df_bool,'Item_Identifier'].apply(lambda x: avg_weight[x])
アイテム識別子の重量に応じてそれを埋めるしないこと。これにより、すべてのアイテムの平均重量に基づいて記入されます。 –