Question: Task 2 : Merge Arrays into a Multidimensional Array Merge these three arrays into a new multidimensional array named 'menu _ item _ info'. The
Task : Merge Arrays into a Multidimensional Array
Merge these three arrays into a new multidimensional array named 'menuiteminfo'. The array should have each row containing an item name, followed by the price,
and then the sales. In other words, the new array should have the same number of rows as the originals, and it should have three columns. Print the structure and
content of 'menuiteminfo'.
Insert your Pythos code here
Task : Build Array of Extended Sales
Construct a new array named 'menuitemextendedsales', with a single column equal 'price sales' for each item from 'menujteminfo'. Print the structure and
content new array.
Task : Append Extended Sales onto Existing Array
Use npcolumnstack' to append 'menujtemextendedsales' onto 'menuiteminfo'. Then, print the structure and content of the new 'menuiteminfo'.
Task : Array Aggregate Functions
Calculate and print the sum, mean, standard deviation, min, and max of the extended sales values from 'menuitemextendedsales':
s Insert your Python code bere
Task : Highvalue Items
Create a new NumPy Array named 'highextendedsales' that holds the highest extended prices.
hint:
sort 'menuitemextendedsales'
Hip to reverse order
slice out the highest rows
Print the structure of the 'highextendedsales' number of dimensions, the data type of its elements, and the shape Then print the 'highextendedsales'.
Task Convert to a Pandas DataFrame
Corvert 'menuiteminfo' into a Pandas DataFrame named 'menuiteminfodf Use the item name as the DataFrame index. Name the other columns as 'Price',
'Sales', and 'Extended Sales'. Print the new DataFrame.
Task : Retrieve Specific Data from the DataFrame
Print the row corresponding to the menu item 'Spicy Texas Red Sauce' using the DataFrame index.Task Create NumPy Arrays from Lists
Start by importing the NumPy library. Then, create NumPy arrays for the menu items, prices, and sales from the provided lists. Print the structure of each arraythis
should include the number of dimensions, the data type of its elements, and its shape.
menuitemlist Woodfired Smoked Ribs", "Hickory Smoked Brisket", "Tender Pulled Pork",
"Smoky Chicken Halves", "Smoked Sausage Links", RBC Special Meat Platter",
"Smokehouse Wings", "Smokehouse Turkey", "Texas Style Beef Short Ribs",
St Louis Cut Ribs", "Smoked Baked Beans", "Classic Coleslaw", "Sweet Cornbread",
"Country Style Green Beans", "Creamy Mac n Cheese", "Southern Potato Saad",
"Buttered Corn on the Cob", "Collard Greens", "The Carnivore", "The Garden Patch",
"The RBC Special", "The Cheesy Delight", "The Hot & Spicy", "The Pizza Pie",
"The Wing Master", "The Porky Pig", "The Classic", "Build Your Own Pizza",
"Mini Pulled Pork Sandwich", "Chicken Tenders", "Mac n Cheese", "Cheese Pizza",
BBQ Chicken Drumstick", "Grilled Cheese Sandwich", "Kids BBQ Platter",
"Kids Pepperoni Pizza", "Classic Kansas City Sweet Sauce", "Tangy Carolina Gold Sauce",
"Spicy Texas Red Sauce", "Smoky Memphis Sauce", "Honey Mustard Sauce",
"Soda Fountain Classics", "Iced Teas", "Lemonades", "Soft Drinks",
"Freshly Brewed Coffee", "Bread Pudding", "French Silk Caramel Pecan Pie",
"Classic Apple Pie", "Sweet Cherry Pie", "Tart Lemon Meringue Pie",
"Rich Chocolate Cream Pie", "Soda Fountain Creations", "Seasonal Dessert Menu",
"Meats by the Pound", "Whole Pies", BBQ Family Pack", "Pizza Party Pack"
menuitempriceslist
menuitemsaleslist
import numpy as np
menuitemsarray nparraymenuitemlist
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
