Advertisement
korenizla

задача №5

Jan 29th, 2022
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. import pandas as pd
  2. stock = pd.read_excel('/datasets/stock.xlsx', sheet_name='storehouse')
  3. xiaomi = stock.loc[stock['item'] == 'Смартфон Xiaomi Redmi 6A 16GB']['count'].sum()
  4. # print(xiaomi)
  5. huawei = stock.loc[stock['item'] == 'Смартфон HUAWEI P30 lite']['count'].sum()
  6. #print(huawei)
  7. stock = stock['item'].drop_duplicates()
  8. print(stock)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement