Pandas

Tips

有条件地对结果进行 unique

read = pd.DataFrame(alist, columns=['time', 'note_id', 'user_id'])
read = pd.groupby(['note_id', 'user_id'])['date'].min() # series.Series
read = pd.reset_index()  # frame.DataFrame, columns 分别是 note_id, user_id, time