Question: A data analyst is working with a data frame called sales. In the data frame, a column named location represents data in the format city

A data analyst is working with a data frame called sales. In the data frame, a column named location represents data in the format city, state. The analyst wants to split the city into an individual city column and state into a new countrycolumn. What code chunk lets the analyst split the location column?
1 point
separate(sales, location, into=c("city", "country"), sep=",")
separate(sales, location, into=c("country", "city" ), sep="")
untie(sales, location, into=c("city", "country"), sep=",")
separate(sales, location, into=c("country", "city" ), sep=",")

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!