#academy_awards is a Pandas Dataframe
academy_awards["Year"].str[0:4].astype("int")
Select the elements in each value in the column, and convert the Year column to the int64 data type using astype() method.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.