2021年3月4日星期四

Fill NA in a column based on another column

id  keyword                   text    

0 1 NaN ....our deeds are the reason of this earthquake ma...
1 4 NaN ....forest fire near la ronge sask canada...
2 5 NaN ....all residents asked to shelter in place are be...
3 6 NaN ....13000 people receive wildfires evacuation orde...
4 7 NaN ....just got sent this photo from ruby alaska as s...

keyword_list = ['wildfires', 'earthquake', 'tornado']

How do I solve if a word that is in keyword_list is in text column fill keyword column with that word.

https://stackoverflow.com/questions/66486273/fill-na-in-a-column-based-on-another-column March 05, 2021 at 11:17AM

没有评论:

发表评论