假設我的數據是這樣的如何在模式中標記唯一的事件,因爲這些值在同時發生時是唯一的,而不是在它們分開時發生。
student article.bought
1 A pen
2 B pencil
3 V book
4 A pen
5 A inkbottle
6 B pen
7 B pencil
8 B pencil
9 V book
10 Z marker
11 A inkbottle
12 V book
13 V pen
14 V book
我需要的物品獨特的出現可能是像一個不同的專欄,
student article.bought Occurences
1 A pen 1
2 B pencil 1
3 V book 1
4 A pen 1 # as A is taking a pen again
5 A inkbottle 2 # 'A' changed from pen to ink bottle
6 B pen 2
7 B pencil 3 # though B took pencil before, this is different as he took a pen in between
8 B pencil 3
9 V book 1
10 Z marker 1
11 A inkbottle 2
12 V book 1
13 V pen 2
14 V book 3
感謝您的快速回復。文章應該是唯一標記的。如果學生拿一篇文章,它應該被標記爲1,下一篇文章爲2等等。如果文章立即重複,數字應該保持不變並且如果在介紹了一些文章之後重複了該文章,那麼該文章應該被視爲另一篇文章 –
,因此,如果您想在一個學生內部從一篇文章轉換到另一篇文章時想增加一個數值,原始排序順序是否有意義?當這個學生以前使用過的產品發生轉變時(但不是在......之前......例如筆書筆),這個數值應該做什麼? – MikeD
是的,只要在一名學生中有一篇文章向另一篇文章過渡,就要增加一個數值。 –