Skip to content

Instantly share code, notes, and snippets.

@charlie-collard
Created August 29, 2023 22:35
Show Gist options
  • Save charlie-collard/8275a39b343b59a356e15c9a04fd339d to your computer and use it in GitHub Desktop.
Save charlie-collard/8275a39b343b59a356e15c9a04fd339d to your computer and use it in GitHub Desktop.
import pandas
import numpy
arr = numpy.triu(numpy.random.randint(-10000, 10000, (175, 175)))
arr = arr.transpose() + arr
# Add mistake
arr[152, 8] = 10
rows, cols = numpy.nonzero(arr - arr.transpose())
print("Company 1, Company 2, Value")
for row, col in zip(rows, cols):
print(f"{row}, {col}, {arr[row, col]}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment