I have an old client database (.csv
) of addresses. The biggest problem is they are not consistent and when I separate it, the Municipality is either in the Area, or City or so on...
Example:
(header) Country, Municipality, City, Detailed address(street name, number, floor, ap.)
**(proper) Count.xxxxxx, Mun.xxxxx, City.xxxx**
(case 1) Count.xxxxxx, City.xxxx, Mun.xxxxx
(case 2) Count.xxxxxx, City.xxxx, -Mun.xxxxx
(case 3) City.xxxx, Count.xxxxxx, Mun.xxxxx
(case 4) Mun.xxxxx, City.xxxx, Count.xxxxxx
(case 5) Mun.xxxxx, Count.xxxxxx, City.xxxx
"xxxx" = various names, contains also numbers, spaces and ".
I tried to reorder them all on the following format:
Count.
,Mun.
,City.
but everything I saw and tried was more like sorting and filtering
I need help reordering, so that the database is consistent and all the data is in the appropriate column.
more sophisticated examples:
Country,Area,Municipality,City,Detailed address street/boulevard number entrance floor ap. number (Detailed address is like Boul. Bulgaria 100 entr.A fl.4 ap.256)
As you can imagine not all fields are filled, and sometimes fields are not separated with "," (but this is a problem I will have to live with... cannot go throough 65k rows...)
Count.xxxxx, Area.xx xxx, Munic.xxxxx, Cit.xxxxx, Addr.xxxxx
Area.xxxxx, Munic.xxxxx, Cit.xxxxx, Addr.xxxxx Munic.xxxxx, Cit.xxxxx,
Addr.xx xxx, Count.xxxxx Count.xxxxx, Munic.xxxxx, Cit.xxxxx, Addr.xxxxx
Munic.xxxxx, Vill.xxxxx Area.xxxxx, Addr.xxxxx Munic.xxxxx, Cit.xxxxx
Cit.xxxxx, Munic.xx xxx, Addr.xxx xx
and the other thing is that it could be either City or Village (ct. vill.)