ADS Mid Term Lab QB
ADS Mid Term Lab QB
1. Write a python program to explain how can you handle missing values using simpleimputer.
2. Illustrate reshaping a 3*4 numpy array to 2*2*3 numpy array (using python). State the condition to re-
shape arrays from one array to another.
3. Create an empty series, series using numpy array, series using a list (using python).
4. Explain how can you handle missing values for time series data using python.
7. Demonstrate how can you visualise null values using heat map. (Use python).
9. Explain how to read different files (excel, table, csv) using pandas in python.
10. Create a 2-D numpy array and perform any five math operations with that array(using python).
12. Write a python program to read n integers from the user as a tuple. Create a tuple of tuples with each in-
put item and its count. Sample Input : (1,2,1,3,4,2,4) Output : ((1,2), (2,2), (3,1), (4,2))
13. Explain how can you handle missing values for time series data using python.
16. Explain any five methods where feature aggregation. (Use python).
17. Explain how to swap first and last elements of a list (using python).
18. Create a 2-D numpy array and perform any five math operations with that array(using python).
19. Write a python program to check whether a number is odd or even using list comprehension.
20. Explain how can you filter data from a data frame using a boolean mask. (Using python)
21. Explain how can you handle missing values using mean , median and mode. (Using python)
22. Read the ages of people in a village. For ages between 1 to 5 store the string "infant", between 6 to 13
store the string "child", between 14 to 18 store the string "teen", between 19 to 35 store the string "young",
between 36 to 60 store the string "adult" and above 60, store the string "senior citizen". Print the resultant
list.
23. Read the marks of 5 students in a course as a tuple. Print the highest, lowest and average of the input.
24. Read n integers from the user as a tuple. Create a tuple of tuples with each input item and its count.
26. Create a shopping list with details of fruits purchased as a list of tuples. Each tuple should be(fruit_name,
fruit_weight). Print the following outputs: