Question: CODE TO USE: S3_TRAFFIC_LIGHT = pd.Series(['STOP','YIELD','GO'], index=['red','yellow','green']) S3_VALUES = S3_TRAFFIC_LIGHT.values S3_INDEX = S3_TRAFFIC_LIGHT.index Access/Modify values using index values 11.Set variable S3_STOP_VALUE to the value associated

CODE TO USE:

S3_TRAFFIC_LIGHT = pd.Series(['STOP','YIELD','GO'], index=['red','yellow','green']) S3_VALUES = S3_TRAFFIC_LIGHT.values S3_INDEX = S3_TRAFFIC_LIGHT.index

Access/Modify values using index values

11.Set variable S3_STOP_VALUE to the value associated with index 'STOP' 12.Set variable S3_GO_VALUE to the value associated with index 'GO'

BUT you MUST use the 0-based index (NOT the label!)

13.Set variable S3_ROWS_12 to the values in Row1 and Row2 14.Update the value associated with index 'YIELD' to 'Hurry!' 15.Update the value associated with index 'STOP' to 'OH NO!'

BUT you MUST use the 0-based index (NOT the label!)

# DO NOT MODIFY !!! # Print values accessed by indices print(f"S3_STOP_VALUE: {S3_STOP_VALUE}") print(f"S3_GO_VALUE: {S3_GO_VALUE} ") print(f"S3_ROWS_12: {S3_ROWS_12} ")

# Print updated Series values print(f"S3_TRAFFIC_LIGHT Updated Series: {S3_TRAFFIC_LIGHT}")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!