Is there a reason that chipo ['item_price'].sum() returns the full list of item prices instead of summing them? Instead, I have used sum(map(float,chipo['item_price'])), which causes problems since now chipo['item_price'] is of type map.
Previously, this worked: chipo['quantity'].sum()
I think the issue is here (code for #12) . This code worked but I think it may have changed the type for item_price.
chipo['item_price'] = chipo['item_price'].apply(lambda x: x.replace('$','')) #deleting the $ sign
chipo.item_price.apply(lambda x: float(x)) #turning into float
Due to this, I am unable to solve #16 since I have an int and a map.
Is there a reason that chipo ['item_price'].sum() returns the full list of item prices instead of summing them? Instead, I have used sum(map(float,chipo['item_price'])), which causes problems since now chipo['item_price'] is of type map.
Previously, this worked: chipo['quantity'].sum()
I think the issue is here (code for #12) . This code worked but I think it may have changed the type for item_price.
chipo['item_price'] = chipo['item_price'].apply(lambda x: x.replace('$','')) #deleting the $ sign chipo.item_price.apply(lambda x: float(x)) #turning into float
Due to this, I am unable to solve #16 since I have an int and a map.
Thanks!