Fixed index out of range error by testing if the index was larger than the length of "chunks." Added if statement to check for duplicates in "start_end_list."

Median.py is a test of the pandas package.