I would like to :
Extract from df a movies DataFrame, containing only movies (movie content).
Create a new variable duree at movies, which contains the values of the duration variable with the last 4 characters truncated.
Change the type of the variable duration to int.
1. movies = df[df['type'] == 'Movie']
2. movies['duration'] = movies['duration'].astype(str).str[:-4]
3. movies['duration'].astype(int)
I can't create my new variable duree which contains the values of the duration variable with the last 4 characters truncated