BaşlayınÜcretsiz başlayın

Analyzing numeric columns

You have already identified missing values and unique entries in your grocery inventory dataset. Now you need to understand the pricing patterns in your inventory by analyzing the Unit_Price column. Calculate basic statistical measures like minimum, maximum, mean, and standard deviation of product prices.

tablesaw packages have been imported for you.

Bu egzersiz, kursun bir parçasıdır

Cleaning Data in Java

Kursa Göz Atın

Egzersiz talimatları

  • Extract the Unit_Price column.
  • Compute the min and max of Unit_Price.
  • Compute the mean and standard deviation of Unit_Price.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

public class GroceryDataQuality {
    public static void main(String[] args) {
        Table inventory = Table.read().csv("grocery_inventory.csv");

        // Extract the unit price column
        DoubleColumn price = ____.____("Unit_Price");
        System.out.println("Stock Quantity Statistics:");

        // Compute the min and max of unit price
        System.out.println("Min: " + price.____());
        System.out.println("Max: " + price.____());

        // Compute the mean and standard deviation of the unit price
        System.out.println("Mean: " + price.____());
        System.out.println("Standard deviation: " + price.____());
    }
}
Kodu Düzenle ve Çalıştır