|
20 | 20 |
|
21 | 21 | Slovak = final[final['Category'] == 0]
|
22 | 22 | Slovak.apply(lambda x: x.astype(str).str.lower())
|
| 23 | +Slovak.Text = Slovak.Text.str.replace('\d+', '') |
23 | 24 | French= final[final['Category'] == 1]
|
24 | 25 | French.apply(lambda x: x.astype(str).str.lower())
|
| 26 | +French.Text = French.Text.str.replace('\d+', '') |
25 | 27 | Spanish= final[final['Category'] == 2]
|
26 | 28 | Spanish.apply(lambda x: x.astype(str).str.lower())
|
| 29 | +Spanish.Text = Spanish.Text.str.replace('\d+', '') |
27 | 30 | German= final[final['Category'] == 3]
|
28 | 31 | German.apply(lambda x: x.astype(str).str.lower())
|
| 32 | +German.Text = German.Text.str.replace('\d+', '') |
29 | 33 | Polish= final[final['Category'] == 4]
|
30 | 34 | Polish.apply(lambda x: x.astype(str).str.lower())
|
| 35 | +Polish.Text = Polish.Text.str.replace('\d+', '') |
31 | 36 |
|
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 | +Slovak.to_csv(r'./Slovak1.csv', index=False, encoding='utf-8') |
| 38 | +French.to_csv('./French1.csv', index=False, encoding='utf-8') |
| 39 | +Spanish.to_csv('Spanish1.csv', index=False, encoding='utf-8') |
| 40 | +German.to_csv('German1.csv', index=False, encoding='utf-8') |
| 41 | +Polish.to_csv('Polish1.csv', index=False, encoding='utf-8') |
37 | 42 |
|
38 | 43 | 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) |
| 44 | +Slovak.to_csv('Slovak_v1.txt', index=False,encoding='utf-8', columns = header) |
| 45 | +French.to_csv('French_v1.txt', index=False, encoding='utf-8', columns = header) |
| 46 | +Spanish.to_csv('Spanish_v1.txt', index=False, encoding='utf-8', columns = header) |
| 47 | +German.to_csv('German_v1.txt', index=False,encoding='utf-8', columns = header) |
| 48 | +Polish.to_csv('Polish_v1.txt', index=False, encoding='utf-8', columns = header) |
44 | 49 |
|
45 | 50 |
|
46 | 51 |
|
|
0 commit comments