in [ ]spliced out[ ] nan to replace the data for subset of symbolsyou can use any of the above techniquesbut sometimes it' simpler to just set the columns directly with dataframe indexingin [ ]cp_spliced spliced copy(in [ ]cp_spliced[[' '' ']data [[' '' ']in [ ]cp_spliced out[ ] nan nan nan return indexes and cumulative returns in financial contextreturns usually refer to percent changes in the price of an asset let' consider price data for apple in and in [ ]import pandas io data as web in [ ]price web get_data_yahoo('aapl''')['adj close'in [ ]price[- :out[ ]date nameadj close for applewhich has no dividendscomputing the cumulative percent return between two points in time requires computing only the percent change in the pricein [ ]price[''price['' out[ ] financial and economic data applications www it-ebooks info