wrote a doc_string for index function
Merge pull request #1 from priyanjasingh/doc_index

wrote a doc_string for index function