I have the following numpy array:
import numpy as np pair_array = np.array([(205, 254), (205, 382), (254, 382), (18, 69), (205, 382), (31
This is crosstab:
crosstab
pd.crosstab(pair_array[:,0], pair_array[:,1])
Output:
col_0 69 82 183 254 267 382 row_0 18 1 0 0 0 0 0 31 0 1 1 0 1 0 183 0 0 0 0 1 1 205 0 0 0 1 0 2 254 0 0 0 0 0 1