import seaborn as sns
flight_data = sns.load_dataset("flights")
When I try to get the dataset, the following error always occurs. It works well previously. I don' t know whether it is because of the net connection.
Traceback (most recent call last):
File "D:\python程序\实习代码\运筹初探\torch_lstm.py", line 21, in <module>
flight_data = sns.load_dataset("flights")
File "D:\python\anaconda\anaconda\envs\pytorch-gpu\lib\site-packages\seaborn\utils.py", line 490, in load_dataset
df = pd.read_csv(full_path, **kws)
File "D:\python\anaconda\anaconda\envs\pytorch-gpu\lib\site-packages\pandas\util\_decorators.py", line 311, in wrapper
return func(*args, **kwargs)
File "D:\python\anaconda\anaconda\envs\pytorch-gpu\lib\site-packages\pandas\io\parsers\readers.py", line 586, in read_csv
return _read(filepath_or_buffer, kwds)
File "D:\python\anaconda\anaconda\envs\pytorch-gpu\lib\site-packages\pandas\io\parsers\readers.py", line 482, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "D:\python\anaconda\anaconda\envs\pytorch-gpu\lib\site-packages\pandas\io\parsers\readers.py", line 811, in __init__
self._engine = self._make_engine(self.engine)
File "D:\python\anaconda\anaconda\envs\pytorch-gpu\lib\site-packages\pandas\io\parsers\readers.py", line 1040, in _make_engine
return mapping[engine](self.f, **self.options) # type: ignore[call-arg]
File "D:\python\anaconda\anaconda\envs\pytorch-gpu\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py", line 69, in __init__
self._reader = parsers.TextReader(self.handles.handle, **kwds)
File "pandas\_libs\parsers.pyx", line 542, in pandas._libs.parsers.TextReader.__cinit__
File "pandas\_libs\parsers.pyx", line 642, in pandas._libs.parsers.TextReader._get_header
File "pandas\_libs\parsers.pyx", line 843, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas\_libs\parsers.pyx", line 1917, in pandas._libs.parsers.raise_parser_error
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 21: invalid continuation byte
Any help or advice would be appreciated!