Practicing Pandas (Questions Only)
Practicing Pandas (Questions Only)
Q.1. Write a program to generate a series of marks of 10 students. Give grace marks up to 3 marks of
those who are having marks between 30 to 33 marks and print the new list of the marks.
Q.2. Consider the following dataframe named BookDF:
BookID Subject BookTitle Class Publisher Price
1) BookDF.loc [ [True, False, False, False, True, True] ] (Suppose the indexing is Boolean)
2) BookDF [ ‘Price’ > 250]
3) BookDF [ BookDF[ ‘Price’ ] > 250 ]
4) BookDF.Price > 250
5) BookDF [ BookDF.Price > 250 ]