I have a general question on why something worked for me even though the instructor in the video did it differently.
Here is the link for the project: Modifying DataFrames with Pandas | Codecademy
I did NOT use a lambda function for this new column in a data frame yet still got the same results, why did this work without lambda
inventory[‘total_value’] = inventory.price * inventory.quantity
inventory[‘total_value’] = inventory.apply(lambda row: row.quantity * row.price,axis=1)
thanks in advance!