I have DataFrame in Python Pandas like below ("col1" is as string data type):
col1
-------
ACC_P:Indiv|ACC_K:3886|GROUP:gr1|COK:P1K
ACC_P:Group|ACC_K:42|GROUP:gr2|COK:P1C
ACC_P:Indiv|ACC_K:455|GROUP:gpk22|COK:AD2
...
And I need to create new column "col2" where will be only value between "GROUP:" and "|" from values in "col1", so as a result I need something like below:
col1 | col2
--------------------------------------------|-------
ACC_P:Indiv|ACC_K:3886|GROUP:gr1|COK:P1K | gr1
ACC_P:Group|ACC_K:42|GROUP:gr2|COK:P1C | gr2
ACC_P:Indiv|ACC_K:455|GROUP:gpk22|COK:AD2 | gpk22
... | ...
How can I do that in Python Pandas ?