質問編集履歴
2
追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -63,3 +63,27 @@
|
|
63
63
|
|
64
64
|
|
65
65
|
めんどくさい質問で恐縮ですが、ご教授のほど、よろしくお願いいたします。
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
----------------------追加--------------------------------------------
|
70
|
+
|
71
|
+
理論上、以下のコードでできると考えましたが、これでは時間がかかりすぎると思いました。
|
72
|
+
|
73
|
+
```python
|
74
|
+
|
75
|
+
special_character_list = []
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
for col in col_list_special:
|
80
|
+
|
81
|
+
for i in range(len(df[col.index])):
|
82
|
+
|
83
|
+
if df[col][i].str.contain("-") or df[col][i].str.contain("*"):
|
84
|
+
|
85
|
+
special_character_list.append(df[col][i])
|
86
|
+
|
87
|
+
special_character_list = set(special_character_list)
|
88
|
+
|
89
|
+
```
|
1
文字の訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
・扱うのは、10万行,237列のデータのデータフレーム
|
4
4
|
|
5
|
-
・すべての特殊文字は、少なくとも、"-" or
|
5
|
+
・すべての特殊文字は、少なくとも、"-" or "*"(アスタリスク)が含まれていることがわかっている
|
6
6
|
|
7
7
|
|
8
8
|
|