美国犯罪率练习-时间序列索引(to_datetime(), .resample(), .set_index(), .idxmax())
时间序列知识点将Year列的数据类型转换为datetime64crime.Year=pd.to_datetime(crime.Year,format='%Y')crime.info()output:RangeIndex:55entries,0to54Datacolumns(total12columns):Year55non-nulldatetime64[ns]Population55non-nul