I want to create a column, based on values in another column. I found this approach, but I don't think that this is going to work, since I need to check all the 'Unique_String' values, before 'abstracting' the data.
What do I want?
I want to 'loop'(?) through my 'Text' column, see if there is data available. If not, it should look into the 'Unique_String' column, and abstract (if available) the values, and paste it into the Text column.
Data
I have a dataframe like this:
Unique_String Text
AAA Here is text!
AAA nan
BBB nan
BBB Here is text as well!
BBB Feyenoord
CCC nan
CCC nan
The desired output is:
Unique_String Text
AAA Here is text!
AAA Here is text!
BBB Here is text as well!
BBB Here is text as well!
BBB Feyenoord
CCC nan
CCC nan
Many Thanks!