Summarizing dataframe into a dictionary,df.groupby('date')['level'].first().apply(np.ceil).astype(int).to_dict()