Apologies, if this is a duplicate please let me know, I'll gladly delete.
My dataset:
Index Col 1 Col 20 1 4, 5, 6
1 2 7, 8, 9
2 3 10, 11, 12
3 4 13, 14, 15
I am attempting to create a function that will take a particular column 1 value as its input and output the column 1 value with its corresponding column 2 values.
For example, if I used the function for when column 1 is equal to 3, the function would return a list of 4 values: 3, 10, 11, 12
Many thanks