Final Quiz
This quiz will make sure you've covered the necessary knowledge in the application of functions using apply/map in Pandas.
Final apply/map quiz
1
How can you create a new column containing the value in plays
multiplied by 2? (Choose all that apply.)
A)
df['new_plays'] = df['plays'] * 2
B)
df['new_plays'] = df.apply(lambda x: x['plays'] * 2, axis=1)
C)
df['new_plays'] = df.apply(lambda x: x['plays'] * 2, axis=0)
D)
df['new_plays'] = df['plays'].map(lambda x: x*2)
Question 1 of 30 attempted
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.