1. How do you select the first 5 rows of a DataFrame?
C. df.head(5)
2. How do you select random 10 rows from a DataFrame?
C. df.sample(10)
3. How do you convert a DataFrame to a NumPy array?
D. df.to_numpy()
What is the function used to calculate the cumulative sum in a DataFrame column? - Bonus
A. df.cumsum()
#python #interviewquestions #pandas #pandastutorial