Final Quiz
This quiz will make sure you've covered the necessary knowledge in the application of functions using apply/map in Pandas.
We'll cover the following...
We'll cover the following...
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)
1 / 3
Hopefully, you got the ...