Created
September 27, 2016 14:06
-
-
Save anonymous/c6f6beffddc7efed685e375c0f02e144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = open("C:\Users\tdoucet\Desktop\Test.csv") | |
dict = {} | |
for line in data: | |
x = line.split(",") | |
a = x[0] | |
b = x[1] | |
dict[a] = b | |
level0 = [] | |
level1 = [] | |
level2 = [] | |
level3 = [] | |
level4 = [] | |
level5 = [] | |
level6 = [] | |
for i in range (0,limit): | |
for key, value in dict.iteritems(): | |
if value isnull: | |
level0.append(key) | |
if len(level0) == 0: | |
break | |
if value in level0: | |
level1.append(key) | |
if len(level1) == 0: | |
break | |
if value in level1: | |
level2.append(key) | |
if len(level2) == 0: | |
break | |
if value in level2: | |
level3.append(key) | |
if len(level3) == 0: | |
break | |
if value in level3: | |
level4.append(key) | |
if len(level4) == 0: | |
break | |
if value in level4: | |
level5.append(key) | |
if len(level5) == 0: | |
break | |
if value in level5: | |
level6.append(key) | |
if len(level6) == 0: | |
break | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment