Pattern Matching with Clustering



I have a number of datasets with a common column named ‘Sample’.
Now I want to perform two functions:

  1. Cluster similar datasets together
  2. Inside a particular dataset, group samples into different clusters on the basis of some sort of pattern matching, as sample names could be text, numbers or alphanumeric with special characters as well


Provide an sample dataset or metadata and it will be easy to help out.