We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8be52cb commit 87e899bCopy full SHA for 87e899b
main.py
@@ -0,0 +1,25 @@
1
+import pandas as pd
2
+import matplotlib.pyplot as plt
3
+n_maxcol = 3000
4
+cols = dict()
5
+for i in range(26):
6
+ cols[str(i)] = []
7
+ pass
8
+def convert(cell):
9
+ """
10
+ this function is for test
11
12
+ for i in range(26):
13
+ cols[str(i)].append(str(cell).count(chr(ord('A')+i)))
14
15
16
+
17
+df = pd.read_csv('test.txt',header=None)
18
+df[0] = df[0].apply(convert)
19
+result = pd.DataFrame()
20
21
+ result[chr(ord('A')+i)] = cols[str(i)]
22
23
+result['TYPE'] = df[1]
24
+result.to_csv('result.csv')
25
+print(result)
0 commit comments