AI Lab 3: NumPy and Pandas Questions
These 10 questions focus on the fundamental concepts of NumPy and Pandas for data manipulation and analysis.
- Using NumPy, create an empty array of shape 3x4 and a full array of shape 3x3 filled with the value 5, both with `integer` type.
- Write a NumPy program to create a 1D array of 5 zeros, a 2D array of zeros with shape 3x4, and a multi-dimensional array of zeros with shape 2x3x4.
- Given a NumPy array, check if a specified list of values is present in the array. Print the boolean result.
- Write a NumPy program to create an array with numbers from 0 to 9 and then reshape it into a 3x3 matrix.
- Write a Pandas program to create a Series from a list of numbers and calculate its mean and standard deviation.
- Given a Pandas Series, write a program to create a new Series containing only the elements that are less than 6.
- Write a Pandas program to find the items that are present in one given Series but not in another.
- Write a Pandas program to create a DataFrame from a dictionary and then display a summary of its basic information.
- From a given DataFrame, write a Pandas program to select and display only the 'name' and 'score' columns.
- Write a Pandas program to select and display all rows from a DataFrame where the `score` is between 15 and 20 (inclusive).