MulaiMulai sekarang secara gratis

.str.strip()

There is nothing scarier than spaces you can't see! Let's keep working with the movies DataFrame and make sure there's no creepy whitespace around our movie titles!

Latihan ini adalah bagian dari kursus

Python for Spreadsheet Users

Lihat Kursus

Petunjuk latihan

  • Use the right method for removing whitespace on the movie_title column.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Strip whitespace from the movie_title column
movies['movie_title'] = movies['movie_title'].____

# Look at the result
print(movies)
Edit dan Jalankan Kode