题解 | #牛客网每日正确与错误的答题次数#
牛客网每日正确与错误的答题次数
https://www.nowcoder.com/practice/bd74b186d5954eb69c00ee804cebe364
import pandas as pd f = pd.read_csv('nowcoder.csv') f['year-month-day'] = pd.to_datetime(f['date']).dt.date sort = (pd.to_datetime(f['date']).dt.year == 2021) & (pd.to_datetime(f['date']).dt.month == 12) f_sort = f[sort] f_final = f_sort.groupby(['result', 'year-month-day']).count().question_id print(f_final)