質問編集履歴

5

コード追加

2020/06/28 13:13

投稿

PPAP_AWS
PPAP_AWS

スコア105

test CHANGED
File without changes
test CHANGED
@@ -64,19 +64,7 @@
64
64
 
65
65
 
66
66
 
67
- ’’’’export_file_path= '/Users/??/Desktop/MyPython'
67
+ ’’’’export_file_path = '/Users/??/Desktop/MyPython
68
-
69
-
70
-
71
- File "<ipython-input-31-27c464377037>", line 1
72
-
73
- export_file_path= '/Users/??/Desktop/MyPython'
74
-
75
- ^
76
-
77
- SyntaxError: invalid character in identifier
78
-
79
-
80
68
 
81
69
 
82
70
 

4

コード追加

2020/06/28 13:13

投稿

PPAP_AWS
PPAP_AWS

スコア105

test CHANGED
File without changes
test CHANGED
@@ -56,4 +56,52 @@
56
56
 
57
57
  SyntaxError: invalid character in identifier
58
58
 
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+ ’’’’export_file_path= '/Users/??/Desktop/MyPython'
68
+
69
+
70
+
71
+ File "<ipython-input-31-27c464377037>", line 1
72
+
73
+ export_file_path= '/Users/??/Desktop/MyPython'
74
+
75
+ ^
76
+
77
+ SyntaxError: invalid character in identifier
78
+
79
+
80
+
81
+
82
+
83
+ ’’’’for i in company_name:
84
+
85
+ df_order_company = df_order[df_order['会社名'] == i]
86
+
87
+ df_order_company.to_excel(export_file_path+'/'+i+'.xlsx')
88
+
89
+
90
+
91
+ File "<ipython-input-29-58f4cd063e9b>", line 2
92
+
93
+ df_order_company = df_order[df_order['会社名'] == i]
94
+
95
+ ^
96
+
97
+ IndentationError: expected an indented block
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
59
107
  ```

3

コード追加

2020/06/28 13:07

投稿

PPAP_AWS
PPAP_AWS

スコア105

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  pathをどうコードを書けば、エラー無く実行されるのかわからないで、コードの書き方をご教授お願い致します。
4
4
 
5
+ OS---macOS Catalina
5
6
 
7
+ ver10.15.5
6
8
 
7
9
  ```python
8
10
 

2

コード追加

2020/06/28 10:32

投稿

PPAP_AWS
PPAP_AWS

スコア105

test CHANGED
File without changes
test CHANGED
@@ -30,4 +30,28 @@
30
30
 
31
31
  NameError: name 'export_file_path' is not defined
32
32
 
33
+
34
+
35
+ 追記
36
+
37
+ for i in company_name:
38
+
39
+ df_order_company = df_order[df_order['会社名'] == i]
40
+
41
+ export_file_path= company_name:'/Users/??/Desktop/MyPython/sample-1.xlsx'
42
+
43
+ df_order_company.to_excel(export_file_path+'/'+i+'.xlsx')
44
+
45
+
46
+
47
+ エラー
48
+
49
+ File "<ipython-input-1-778b39ef22ea>", line 3
50
+
51
+ export_file_path= company_name:'/Users/??/Desktop/MyPython/sample-1.xlsx'
52
+
53
+   ^
54
+
55
+ SyntaxError: invalid character in identifier
56
+
33
57
  ```

1

コード追加

2020/06/28 10:31

投稿

PPAP_AWS
PPAP_AWS

スコア105

test CHANGED
File without changes
test CHANGED
@@ -5,8 +5,6 @@
5
5
 
6
6
 
7
7
  ```python
8
-
9
- ここに言語を入力
10
8
 
11
9
  for i in company_name:
12
10