more rigidin downsamplingthe target frequency must be subperiod of the source frequency in upsamplingthe target frequency must be superperiod of the source frequency if these rules are not satisfiedan exception will be raised this mainly affects the quarterlyannualand weekly frequenciesfor examplethe timespans defined by -mar only line up with -mara-juna-sepand -decin [ ]annual_frame resample(' -mar'fill_method='ffill'out[ ]colorado texas new york ohio - - - - - - - - - time series plotting plots with pandas time series have improved date formatting compared with matplotlib out of the box as an examplei downloaded some stock price data on few common us stock from yahoofinancein [ ]close_px_all pd read_csv('ch /stock_px csv'parse_dates=trueindex_col= in [ ]close_px close_px_all[['aapl''msft''xom']in [ ]close_px close_px resample(' 'fill_method='ffill'in [ ]close_px out[ ]datetimeindex entries : : to : : freqb data columnsaapl non-null values msft non-null values xom non-null values dtypesfloat ( calling plot on one of the columns grenerates simple plotseen in figure - in [ ]close_px['aapl'plot(when called on dataframeas you would expectall of the time series are drawn on single subplot with legend indicating which is which 'll plot only the year data so you can see how both months and years are formatted on the axissee figure - in [ ]close_px ix[' 'plot(time series plotting www it-ebooks info