neighbormodels.interactions.group_subspecie_pairs_and_rank_by_distance

group_subspecie_pairs_and_rank_by_distance(data_frame: pandas.core.frame.DataFrame) → pandas.core.frame.DataFrame[source]

Adds rank column to data frame that sorts subspecie pairs by neighbor distance. Compatible with the pandas pipe() method.

Parameters:data_frame – A pandas DataFrame of neighbor counts aggregated over site-index pairs and separation distances.
Returns:A copy of input data_frame with the rank column added.