题解 | #牛客网的每日练题量#
牛客网的每日练题量
https://www.nowcoder.com/practice/c5307933102d47c6895679bc62c9e5a9
import pandas as pd df = pd.read_csv('nowcoder.csv',delimiter=',',dtype=object) df['date'] = pd.to_datetime(df['date'],format='%Y-%m-%d') dec = df[df['date'].dt.month == 12] # 获取时间格式中制定的月份 print(dec.groupby('date')['user_id'].count())