I want to concatenate the column row values separated by ',' looking at a column whose row value should not be zero.
Example in steps:
- group_by date, column name x whose row values are not zero, concatenate values of column name 'colname' separated by ','
- group_by date, column name y whose row values are not zero, concatenate values of column name 'colname' separated by ','
- Using both of these concatenated values in step 1 and step 2, concatenate them separated by '/' creating a new column colname1
- Expand the final concatenated values in colname1 to all the row items of group_by date
The dataframe:
Output dataframe: