質問編集履歴
5
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -31,14 +31,8 @@
|
|
31
31
|
|
32
32
|
|
33
33
|
|
34
|
-
’’’’export_file_path= '/Users/??/Desktop/MyPython
|
34
|
+
’’’’export_file_path = '/Users/??/Desktop/MyPython
|
35
|
-
↓
|
36
|
-
File "<ipython-input-31-27c464377037>", line 1
|
37
|
-
export_file_path= '/Users/??/Desktop/MyPython'
|
38
|
-
^
|
39
|
-
SyntaxError: invalid character in identifier
|
40
35
|
|
41
|
-
|
42
36
|
’’’’for i in company_name:
|
43
37
|
df_order_company = df_order[df_order['会社名'] == i]
|
44
38
|
df_order_company.to_excel(export_file_path+'/'+i+'.xlsx')
|
4
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -27,4 +27,28 @@
|
|
27
27
|
export_file_path= company_name:'/Users/??/Desktop/MyPython/sample-1.xlsx'
|
28
28
|
^
|
29
29
|
SyntaxError: invalid character in identifier
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
’’’’export_file_path= '/Users/??/Desktop/MyPython'
|
35
|
+
↓
|
36
|
+
File "<ipython-input-31-27c464377037>", line 1
|
37
|
+
export_file_path= '/Users/??/Desktop/MyPython'
|
38
|
+
^
|
39
|
+
SyntaxError: invalid character in identifier
|
40
|
+
|
41
|
+
|
42
|
+
’’’’for i in company_name:
|
43
|
+
df_order_company = df_order[df_order['会社名'] == i]
|
44
|
+
df_order_company.to_excel(export_file_path+'/'+i+'.xlsx')
|
45
|
+
↓
|
46
|
+
File "<ipython-input-29-58f4cd063e9b>", line 2
|
47
|
+
df_order_company = df_order[df_order['会社名'] == i]
|
48
|
+
^
|
49
|
+
IndentationError: expected an indented block
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
30
54
|
```
|
3
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
以下のファイルを通したい。
|
2
2
|
pathをどうコードを書けば、エラー無く実行されるのかわからないで、コードの書き方をご教授お願い致します。
|
3
|
-
|
3
|
+
OS---macOS Catalina
|
4
|
+
ver10.15.5
|
4
5
|
```python
|
5
6
|
for i in company_name:
|
6
7
|
df_order_company = df_order[df_order['会社名'] == i]
|
2
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,4 +14,16 @@
|
|
14
14
|
----> 3 df_order_company.to_excel(export_file_path+'/'+i+'.xlsx')
|
15
15
|
|
16
16
|
NameError: name 'export_file_path' is not defined
|
17
|
+
|
18
|
+
追記
|
19
|
+
for i in company_name:
|
20
|
+
df_order_company = df_order[df_order['会社名'] == i]
|
21
|
+
export_file_path= company_name:'/Users/??/Desktop/MyPython/sample-1.xlsx'
|
22
|
+
df_order_company.to_excel(export_file_path+'/'+i+'.xlsx')
|
23
|
+
|
24
|
+
エラー
|
25
|
+
File "<ipython-input-1-778b39ef22ea>", line 3
|
26
|
+
export_file_path= company_name:'/Users/??/Desktop/MyPython/sample-1.xlsx'
|
27
|
+
^
|
28
|
+
SyntaxError: invalid character in identifier
|
17
29
|
```
|
1
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
pathをどうコードを書けば、エラー無く実行されるのかわからないで、コードの書き方をご教授お願い致します。
|
3
3
|
|
4
4
|
```python
|
5
|
-
ここに言語を入力
|
6
5
|
for i in company_name:
|
7
6
|
df_order_company = df_order[df_order['会社名'] == i]
|
8
7
|
df_order_company.to_excel(export_file_path+'/'+i+'.xlsx')
|