Create Datetime Index Python Function Example