Products still in stock

Data framesEasy7 min

Your task

Given products with columns sku, category, price and stock, return the products whose stock is greater than zero. Return only sku and price, sorted by price ascending and then sku ascending.

Examples

in_stock(products: dataframe) -> dataframe
Example 1
Inputin_stock(products)
products
skucategorypricestock
A-1tools9.9912
B-2tools24.50
C-3garden157
D-4garden153
E-5kitchen420
Output
skuprice
A-19.99
C-315
D-415