I've written code to extract acronyms and other key words out of a PDF to create a glossary list. I've removed duplicates and sorted alphabetically and created a panda dataframe.
A portion of this dataframe (called gloss_of_terms1) looks like this:
Acronyms/Abbrev
0 EMP
1 EFT
2 FCF
3 FY14
4 FY15
5 FY16
6 GDN
7 GP
I effectively want to write some code to group the items FY14, FY15, FY16 (separated by spaces) into one line and have the resultant dataframe look as follows:
Acronyms/Abbrev
0 EMP
1 EFT
2 FCF
3 FY14 FY15 FY16
4 GDN
5 GP
I'm having no luck finding the correct tool/code to do this. Please help!