Python survival analysis