AI Python Lab

AI Lab 3: NumPy and Pandas Questions

These 10 questions focus on the fundamental concepts of NumPy and Pandas for data manipulation and analysis.

  1. 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.
  2. 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.
  3. Given a NumPy array, check if a specified list of values is present in the array. Print the boolean result.
  4. Write a NumPy program to create an array with numbers from 0 to 9 and then reshape it into a 3x3 matrix.
  5. Write a Pandas program to create a Series from a list of numbers and calculate its mean and standard deviation.
  6. Given a Pandas Series, write a program to create a new Series containing only the elements that are less than 6.
  7. Write a Pandas program to find the items that are present in one given Series but not in another.
  8. Write a Pandas program to create a DataFrame from a dictionary and then display a summary of its basic information.
  9. From a given DataFrame, write a Pandas program to select and display only the 'name' and 'score' columns.
  10. Write a Pandas program to select and display all rows from a DataFrame where the `score` is between 15 and 20 (inclusive).