Skip to content

Commit f02f65d

Browse files
committed
conversion to text by taking only "Text" column
Done the same for each language
1 parent b239e94 commit f02f65d

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

CleaningDataCode/CleanAndSplitData.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,19 @@
2828
German.apply(lambda x: x.astype(str).str.lower())
2929
Polish= final[final['Category'] == 4]
3030
Polish.apply(lambda x: x.astype(str).str.lower())
31-
Slovak.to_csv(Slovak, index=False, sep=',',encoding='utf-8')
32-
French.to_csv(French, index=False,sep=',', encoding='utf-8')
33-
Spanish.to_csv(Spanish, index=False,sep=',', encoding='utf-8')
34-
German.to_csv(German, index=False, sep=',',encoding='utf-8')
35-
Polish.to_csv(Polish, index=False,sep=',', encoding='utf-8')
31+
32+
Slovak.to_csv('Slovak.csv', index=False, sep=',',encoding='utf-8')
33+
French.to_csv('French.csv', index=False,sep=',', encoding='utf-8')
34+
Spanish.to_csv('Spanish.csv', index=False,sep=',', encoding='utf-8')
35+
German.to_csv('German.csv', index=False, sep=',',encoding='utf-8')
36+
Polish.to_csv('Polish.csv', index=False,sep=',', encoding='utf-8')
37+
38+
header = ["Text"]
39+
Slovak.to_csv('Slovak.txt', index=False, sep=',',encoding='utf-8', columns = header)
40+
French.to_csv('French.txt', index=False,sep=',', encoding='utf-8', columns = header)
41+
Spanish.to_csv('Spanish.txt', index=False,sep=',', encoding='utf-8', columns = header)
42+
German.to_csv('German.txt', index=False, sep=',',encoding='utf-8', columns = header)
43+
Polish.to_csv('Polish.txt', index=False,sep=',', encoding='utf-8', columns = header)
3644

3745

3846

0 commit comments

Comments
 (0)