Quantcast
Channel: How to change a column values from dataframe comparing value from another dataframe only if the new value is not empty? - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Varsha Kishore for How to change a column values from dataframe...

Try this:df2 = df2.replace(r'^\s*$', np.nan, regex=True)df2 = df2.set_index("patient_id")['email_address'].fillna(df1.set_index('Patient Id')['Email']).reset_index()df1['Email'] = df1['Patient...

View Article


How to change a column values from dataframe comparing value from another...

I have a dataframe with this info let call it df1:Patient Id Email5628 mapy@gmail.com17433 ssdx@gmail.com861415336 cris@yahoo.es17604 avasallo@yahoo.com8635 carolinavi@gmail.com1542415393...

View Article

Browsing latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>