I am a new learner and I was coding the project but when I compared it with the project walk through, some of the lines of codes are different but the end results are same. Am I doing something wrong and Do my codes can be different than the one in project walkthrough as long as it give results.
Below is my code
and some of the lines are different from project walkthrough.
import codecademylib
import csv
import pandas as pd
inventory = pd.read_csv(‘inventory.csv’)
print(inventory.head(10))
staten_island = inventory.iloc[:10]
product_request = inventory.product_description
seed_request = inventory[(inventory.location == ‘Brooklyn’) & (inventory.product_type == ‘seeds’)]
inventory[‘in_stock’] = inventory.quantity.apply( lambda quantity: True if quantity > 0 else False)
inventory[‘total_value’] = inventory.price * inventory.quantity
print(inventory.head(10))
combine_lambda = lambda row:
‘{} - {}’.format(row.product_type,
row.product_description)
inventory[‘full_description’] = inventory.apply(combine_lambda, axis = 1)
print(inventory.head(10))