다음 코드는 (물론) 'Date1'로 정렬 된 행에서 'Item1'의 첫 번째 항목 만 유지합니다. 내가 어떻게 유지할 수 있는지에 대한 제안은 처음 5 번 일어난다.최초의 N 발생 유지
## Sort the dataframe by Date and keep only the earliest appearance of 'Item1'
## drop_duplicates considers the column 'Date' and keeps only first occurence
coocdates = data.sort('Date').drop_duplicates(cols=['Item1'])
아마'[5]'? – Fabricator