Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Add column ( 1 ) In the video, Hugo showed you how to add the length of the country names of the brics DataFrame in

Add column (1)
In the video, Hugo showed you how to add the length of the country names of the brics DataFrame in a new column:
for lab, row in brics.iterrows() :
brics.loc[lab, "name_length"]= len(row["country"])
You can do similar things on the cars DataFrame.
Instructions
100 XP
Use a for loop to add a new column, named COUNTRY, that contains a uppercase version of the country names in the "country" column. You can use the string method upper() for this.
To see if your code worked, print out cars. Don't indent this code, so that it's not part of the for loop.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

Question How are IRAs treated for state tax law purposes?

Answered: 1 week ago