If you are posting a question about how to transform a dataset, please include a short example of the input dataset you have and the corresponding output dataset you want. For each dataset (in decreasing order of prefer…