Game Engine: how to switch scenes in python code
It does exist in the API, the trick is you have to get the scene first:

for scene in bge.logic.getSceneList():
    if scene.name == 'oldSceneName':
        scene.replace('newSceneName')
        break


API:
https://www.blender.org/api/blender_python_api_2_78a_release/bge.types.KX_Scene.html#bge.types.KX_Scene.replace



Another useful 'replace scene' like thing that I have done quite a lot is to end the current scene(s) and then add the new one:

for scene in bge.logic.getSceneList():
    scene.end()
bge.logic.addScene('sceneNameGoesHere')