Skip to content

Instantly share code, notes, and snippets.

@vrootic
Last active May 21, 2019 03:22
Show Gist options
  • Save vrootic/f465539946cf45f2b9cea7c2867b9ab0 to your computer and use it in GitHub Desktop.
Save vrootic/f465539946cf45f2b9cea7c2867b9ab0 to your computer and use it in GitHub Desktop.
import pandas as pd
d = pd.read_excel('filename.xlsx')
total = 0
number_of_rows = len(d)
for i in range(number_of_rows):
if d['ORIG_MESH_250M'][i] == d['DEST_MESH_250M'][i]:
total = total + (d['TRIP_COUNT_EX'][i]*100)
total = total / 100
print(total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment