My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How to concat two data from two columns in Pandas DataFrame?

Faisal Malik's photo
Faisal Malik
·Aug 4, 2019

I am trying to clean up a large dataset, and the two columns im stuck on are 'address' and 'city'. The 'address' column is fine but the 'city' column which should contain only cities has 'APT 3' , '2ND FL', '#567', '55', etc...

I want to add the values from the 'city' column rows, to the proper 'address' column rows... and then delete those values from 'city' so I use fillna() and fill the newly empty spots with city names.

Thank you in advance for your help!