Simple data deduplication

Example1

There is a sequence of numbers, you need to select the number that is not repeated.

Write SPL script:

A1 number sequence

A2 Take out the non-duplicate members in A1

The result in A2 after running is: [1,2,3,5,6,7,8,9,10,15]

Example2

The Excel file book1.xlsx has two columns of Car and Color. Part of the data is shown in the figure below:

List the unique colors in each car, as shown in the figure below:

Write SPL script:

A1 Read in book1.xlsx file data

A2 Groupe by Car and Color, option @1 means that after grouping, only the first record of each group will be taken

A3 Save A2 to the file book2.xlsx

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store