[Solved]Python Code Catalog Statspy Given Data File Mentioned Question 1 Asked Calculate Statistic Q37034868
PYTHON CODE (catalog stats.py): You are given the same data fileas mentioned in Question 1. You are asked to calculate somestatistics on the product prices. First, develop a function called‘form prices array’ that accepts one argument, which is the datafilename to use (e.g., ‘catalog.csv’). The function should return aNumPy array containing product prices in a numerical format. Next,develop a function called ‘print price stats’ that accepts oneargument, which is the prices NumPy array. This function shouldcalculate price statistics, including: • Average and standarddeviation • 5th, 25th, 50th, 75th, and 95th percentiles • Ahistogram of the prices with 5 bins Below is a sample of printedstats from this function. Please note that all the non-integervalues should be formatted to have 2 decimal places. Price stats:Average: 54.59 Standard deviation: 25.95 5th percentile price:14.13 25th percentile price: 32.39 50th percentile price: 54.3475th percentile price: 77.05 95th percentile price: 95.32 10.00 -28.00: 2030 28.00 – 46.00: 2037 46.00 – 63.99: 1987 63.99 – 81.99:1995 81.99 – 99.99: 1951
Expert Answer
Answer to PYTHON CODE (catalog stats.py): You are given the same data file as mentioned in Question 1. You are asked to calculate … . . .
OR

