質問編集履歴

1

大変なことになっているエラーメッセージと、バージョンについて付け足しました。

2021/08/18 12:05

投稿

lovely
lovely

スコア28

test CHANGED
File without changes
test CHANGED
@@ -18,7 +18,49 @@
18
18
 
19
19
 
20
20
 
21
+ Traceback (most recent call last):
22
+
21
- Traceback (most recent call last):http://・・・line 5, in <module>
23
+ File "c:\Users\c7not\OneDrive\デスクトップ\python_lesson\YouTube\secound.py", line 5, in <module>
24
+
25
+ iris_data=pd.read_csv("iris.csv", encoding="utf-8")
26
+
27
+ File "C:\Users\c7not\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\util\_decorators.py", line 311, in wrapper
28
+
29
+ return func(*args, **kwargs)
30
+
31
+ File "C:\Users\c7not\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers\readers.py", line 586, in read_csv
32
+
33
+ return _read(filepath_or_buffer, kwds)
34
+
35
+ File "C:\Users\c7not\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers\readers.py", line 482, in _read
36
+
37
+ parser = TextFileReader(filepath_or_buffer, **kwds)
38
+
39
+ File "C:\Users\c7not\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers\readers.py", line 811, in __init__
40
+
41
+ self._engine = self._make_engine(self.engine)
42
+
43
+ File "C:\Users\c7not\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers\readers.py", line 1040, in _make_engine
44
+
45
+ return mapping[engine](self.f, **self.options) # type: ignore[call-arg]
46
+
47
+ File "C:\Users\c7not\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py", line 51, in __init__
48
+
49
+ self._open_handles(src, kwds)
50
+
51
+ File "C:\Users\c7not\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers\base_parser.py", line 222, in _open_handles
52
+
53
+ self.handles = get_handle(
54
+
55
+ File "C:\Users\c7not\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\common.py", line 701, in get_handle
56
+
57
+ handle = open(
58
+
59
+ FileNotFoundError: [Errno 2] No such file or directory: 'iris.csv'
60
+
61
+
62
+
63
+ 17行しか書いてないのに、バグってるんですかね・・・?
22
64
 
23
65
 
24
66
 
@@ -80,4 +122,6 @@
80
122
 
81
123
 
82
124
 
125
+ pandas=1.3.2
126
+
83
- pythonやpandasのバージョンは最新です。
127
+ python-dateutil=2.8.2