Let’s say I have a dataframe. I want to take the values in col1 (A
for example) and return multiple more values like A.1
, A.2
, A.3
etc.
Each of the values in this column correspond to groups of data elsewhere. I want run a custom function that returns a list of values for these and I want to create a new dataframe with new rows identical to the original row except with the values changed in col1
:
So:
Col1, Col2, Col3
A, 55, type
If A
corresponds to a list such as AB
, AJ
, AI
I want a new dataframe:
Col1,Col2,Col3
AB, 55, type
AJ, 55, type,
AI, 55, type