I am wondering if I could build such a module in Pandas:
def concatenate(df,columnlist,newcolumn):
# df is the dataframe and
# columnlist is the list contains the column names of all the columns I want to concatnate
# newcolumn is the name of the resulted new column
for c in columnlist:
...some Pandas functions
return df # this one has the concatenated "newcolumn"
I am asking this because that len(columnlist) is going to be very big and dynamic. Thanks!