Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csv;
- f = open("btc.csv", "r");
- c = csv.reader(f, delimiter=",");
- fm = open("more.csv", "w");
- fl = open("less.csv", "w");
- fn = open("normal.csv", "w");
- pctTotal = 0.0;
- addresses = 0;
- for row in c:
- btcPaid = float(row[2]);
- shouldReceive = (btcPaid/3055.120324)*15000000;
- gets = float(str(row[3]).replace(",", ""));
- pct = gets/shouldReceive;
- if pct > 1.0:
- fm.write(row[0]);
- fm.write("\n");
- elif pct < 1.0:
- fl.write(row[0]);
- fl.write("\n");
- else:
- fn.write(row[0]);
- fn.write("\n");
- pctTotal += pct;
- addresses += 1;
- fm.close();
- fl.close();
- fn.close();
- print (pctTotal/addresses)*100;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement