def replace_words(text, word_dic):
	rc = re.compile('|'.join(map(re.escape, word_dic)))
	def translate(match):
        	return word_dic[match.group(0)]
	return rc.sub(translate, text)
Shift Index containing datetime objects by input number of periods and
dataset/ETHPy150Open proffalken/edison/api/handlers.py/replace_words--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index.shift