Type A (Very Short Questions)
1. What is the significance of Pandas library?
2. Name some common data structures of Python’s Pandas library.
3. How is Series object different from and similar to ndarrays ? Support your answer with example.
4. Write commands to print following details of a Series object seal.
5. Given following Series objects:
S1 S2 0 3 0 12 1 5 2 10 2 6 3 15 4 10 4 20 5 12 6 27
(a) What will be the result of S1 + S2 ?
(b) What will be the result of S1 – S2 ?
6. Given a dataframe df as shown below:
A B D 0 15 17 19 1 16 18 20 2 20 21 22
10. Write statement(s) to delete a row from Dataframe.
11. Write statement(s) to delete a column from a Dataframe.
12. Write the statement to change the value at 5th row, 6th column in a Dataframe df.
14. What is the difference between iloc and loc with respect to Dataframe ?
15. What is the difference between iat and at.
16. How would you delete column from a Dataframe.
17. How would you delete rows from Dataframe ?
18. Which function would you use to rename the index/column names in a Dataframe?