I want to be able to copy the values under the allergy column there are three languages. I want use pandas Dataframes to move specific cell values data from the row English to french above it and dutch underneath it. And After it's been copied, I want to delete the row English.
Note: Index is the languages below. They go in the order of French, English, Dutch, French, English, Dutch and so on. the Values of each are the typical responses are given under the column allergy
Index allergy
french ''
english 'MAY CONTAIN: prawn'
dutch ''
french ''
english 'MAY CONTAIN: peanuts'
dutch ''
french ''
english 'MAY CONTAIN: milk'
dutch ''
So again to summarise, copy specific cell values from English to Dutch and French Rows.
edit: I cant any more comments: Yes this is the pattern for this dataset. this ouput is displayed in excel file.
Desired output:
Index allergy
french 'MAY CONTAIN: prawn'
english 'MAY CONTAIN: prawn' # remove
dutch 'MAY CONTAIN: prawn'
french 'MAY CONTAIN: peanuts'
english 'MAY CONTAIN: peanuts' # remove
dutch 'MAY CONTAIN: peanuts'
french 'MAY CONTAIN: milk'
english 'MAY CONTAIN: milk' # remove
dutch 'MAY CONTAIN: milk'
Afterwards, it Should look like this
Final output:
Index allergy
french 'MAY CONTAIN: prawn'
dutch 'MAY CONTAIN: prawn'
french 'MAY CONTAIN: peanuts'
dutch 'MAY CONTAIN: peanuts'
french 'MAY CONTAIN: milk'
dutch 'MAY CONTAIN: milk'