Dynamically merge lines that share the same key into one
问题 I have a Dataframe and would like to make another column that combines the columns whose name begins with the same value in Answer and QID. That is to say, here is an exerpt of the dataframe: QID Category Text QType Question Answer0 Answer1 0 16 Automotive Access to car Single Do you have access to a car? I own a car/cars I own a car/cars 1 16 Automotive Access to car Single Do you have access to a car? I lease/ have a company car I lease/have a company car 2 16 Automotive Access to car