code: def from_dataframe(event, time, data):
          
          if not isinstance(data, pandas.DataFrame):
              raise TypeError(
                  "exepected pandas.DataFrame, but got {!r}".format(type(data)))
  
          return Surv.from_arrays(
              data.loc[:, event].values,
              data.loc[:, time].values,
              name_event=str(event),
              name_time=str(time))
docs: Create structured array from data frame.
  
          Parameters
          ----------
          event : object
              Identifier of column containing event indicator.
          time : object
              Identifier of column containing time.
          data : pandas.DataFrame
              Dataset.
  
          Returns
          -------
          y : np.array
              Structured array with two fields.