न्यूमेरिक कॉलम का विश्लेषण
आप अपने ग्रॉसरी इन्वेंटरी डेटासेट में missing values और unique entries पहले ही पहचान चुके हैं. अब आपको Unit_Price कॉलम का विश्लेषण करके इन्वेंटरी में pricing patterns समझने हैं. प्रोडक्ट प्राइस के minimum, maximum, mean, और standard deviation जैसी बेसिक सांख्यिकीय मापें निकालिए.
tablesaw पैकेज आपके लिए इम्पोर्ट कर दिए गए हैं.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Java में डेटा क्लीनिंग
अभ्यास निर्देश
Unit_Priceकॉलम निकालिए.Unit_Priceका min और max निकालिए.Unit_Priceका mean और standard deviation निकालिए.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
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.____());
}
}