def _do_ros(df, observations, censorship, transform_in, transform_out):
 cohn = cohn_numbers(df, observations=observations, censorship=censorship)
 modeled = _ros_sort(df, observations=observations, censorship=censorship)
 modeled.loc[:, 'det_limit_index'] = modeled[observations].apply(_detection_limit_index, args=(cohn,))
 modeled.loc[:, 'rank'] = _ros_group_rank(modeled, 'det_limit_index', censorship)
 modeled.loc[:, 'plot_pos'] = plotting_positions(modeled, censorship, cohn)
 modeled.loc[:, 'Zprelim'] = stats.norm.ppf(modeled['plot_pos'])
 return _impute(modeled, observations, censorship, transform_in, transform_out)

def _do_ros ( df , observations , censorship , transform_in , transform_out ) : cohn = cohn_numbers ( df , observations = observations , censorship = censorship ) modeled = _ros_sort ( df , observations = observations , censorship = censorship ) modeled . loc [ : , 'det_limit_index' ] = modeled [ observations ] . apply ( _detection_limit_index , args = ( cohn , ) ) modeled . loc [ : , 'rank' ] = _ros_group_rank ( modeled , 'det_limit_index' , censorship ) modeled . loc [ : , 'plot_pos' ] = plotting_positions ( modeled , censorship , cohn ) modeled . loc [ : , 'Zprelim' ] = stats . norm . ppf ( modeled [ 'plot_pos' ] ) return _impute ( modeled , observations , censorship , transform_in , transform_out )
dataframe-centric function to impute censored valies with ros .