Added get groups function

Added new module to extract data in groups, ideal for data analysis
after preprocessing.