I know this is an old thread, but I found out for service groups on r80.40, the csv-format is:
I haven't tried any other type of groups, so I'm not sure that the format is universal - it is per group, but if some groups have more or less members, I'd think the import would fail as those columns are empty.
Instead I created a REST-API-script that did the export/import of service-groups for me. I'll be publishing it on GitHub and Checkmates this week.
My bad, published it on github, but forgot to link it here. Created a new post as not to spam external links: