1. Learn
  2. /
  3. Courses
  4. /
  5. Cleaning Data in Java

Connected

Exercise

Filtering columns

As a grocery inventory analyst, you need to clean your inventory data to identify perishable items at risk of spoilage. Raw inventory data often includes irrelevant categories and inaccurate stock levels. To clean this data, you'll filter for the "Fruits & Vegetables" category and high stock levels (over 50 units). This process removes non-perishable items and low-stock products, giving you a clean dataset of fruits and vegetables with potential oversupply issues. By cleaning and focusing your data, you can quickly identify which perishable items need immediate attention.

Instructions

100 XP
  • Check if the integer column Stock_Quantity is greater than 50.
  • Check if the string column Category is equal to Fruits & Vegetables.
  • Filter inventory by highQuantity.
  • Add a filter condition for fruitsAndVegetables.