Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How to move observation one columns to another column?

$
0
0

@premsheth wrote:

Hi,

I have directory data file and just trying to do descriptive analysis. Now I have two column name city and zipcode.
Some city name saved in to zipcode columns. now I want to move those city name from zipcode columns to city columns.
Sample Data:

Tumbol Thatum Amphoe Tha Tum Province Surin 32120 Surin 32120
Province Ranong Ranong
154 Moo 6 Soi Wat Koosrang Suksawat Tumbol Nai Khlong Bang Plakot Amphoe Phra Samut Chedi Province Samut Prakan 10290 Samut Prakan 10290
Tumbol Naimueang Amphoe Mueang Chai Nat Province Chai Nat 17000 Chai Nat 17000
Province Chiang Mai Chiang Mai

Here we can see another problem is some city name half in city column and half in zipcode column so how can we correct it?

How can we extract city name from address and impute in city columns? there are 113 cities so we can’t do manually.

Can anyone have any Idea how can I do in R?

Thanks in Advance

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles