GITLAB

Eduardo Eloy / modfire

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • modfire
  • Database
  • convert_s.py
  • 16f90fbc   database and implementation of bioecosys project to serve as a base Browse Code ยป
    Eduardo Eloy
    2022-04-23 21:36:47 +0100  
convert_s.py 299 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import csv, re

fin = open("ii.csv", "rt")
for line in fin:
	s = line.split(",")
	if(float(s[0]) > 0):
		t = "1"
	else:
		t = "0"
	if(float(s[1]) > 0):
		h = "1"
	else:
		h = "0"
	if(float(s[2]) > 0):
		c = "1"
	else:
		c = "0"
	print(t+","+h+","+c+","+s[3]+","+s[4].replace('\n',''))
	
fin.close()