Question: Your First 2 D NumPy Array Before working on the actual MLB data, let's try to create a 2 D numpy array from a small
Your First D NumPy Array
Before working on the actual MLB data, let's try to create a D numpy array from a small list of lists.
In this exercise, baseball is a list of lists. The main list contains elements. Each of these elements is a list containing the height and the weight of baseball players, in this order. baseball is already coded for you in the script.
Instructions
XP
Use nparray to create a D numpy array from baseball. Name it npbaseball.
Print out the type of npbaseball.
Print out the shape attribute of npbaseball. Use npbaseball.shape
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
