Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
327 B
2
Indexable
Never
import pandas as pd
stock = pd.read_excel('/datasets/stock.xlsx', sheet_name='storehouse')
xiaomi = stock[stock['item'] == 'Смартфон Xiaomi Redmi 6A 16GB']['count'].sum()
huawei = stock[stock['item'] == 'Смартфон HUAWEI P30 lite']['count'].sum()
stock['item'] = stock['item'].drop_duplicates()
print(stock)