1
I need to create a function that adds columns from one list to another list in the same order by following this structure here (you can use FOR).
def column_to_list(data, index):
column_list = []
# código entra aqui nesta parte
return column_list
How can I do that? I haven’t learned the right to use the arguments in my favor.
An example would be a Gender column, with several entries of Male and Female. I need to take these results from these lines and turn it into a single list.
output = [’M','F','F',’M','F']
Opa, put in Portuguese, this Stack Overflow is only in this language.
– caiocafardo
Sorry, now that I realize! I will change!
– user107785
When it is [Edit] take the opportunity to put examples of results that the function should return.
– Woss
We still need more details. Please create this list that has several entries of masculine and feminine and from it show us how would be the call of the function that would return the cited output.
– Woss
What is the format of the input? The output we already have. Pass input examples (the data you enter per parameter in date and index) that we help you to get that output.
– Rafael Barros