out[ ]colorado texas new york ohio - - - - - resampling with periods resampling data indexed by periods is reasonably straightforward and works as you would hopein [ ]frame dataframe(np random randn( )index=pd period_range(' - '' - 'freq=' ')columns=['colorado''texas''new york''ohio']in [ ]frame[: out[ ]colorado texas new york ohio - - - - - - - - - - - - - - in [ ]annual_frame frame resample(' -dec'how='mean'in [ ]annual_frame out[ ]colorado texas new york ohio - - - upsampling is more nuanced as you must make decision about which end of the timespan in the new frequency to place the values before resamplingjust like the asfreq method the convention argument defaults to 'endbut can also be 'start' -decquarterlyyear ending in december in [ ]annual_frame resample(' -dec'fill_method='ffill'out[ ]colorado texas new york ohio - - - - - - - - - in [ ]annual_frame resample(' -dec'fill_method='ffill'convention='start'out[ ]colorado texas new york ohio - - - - - - - - - time series www it-ebooks info