这是我的代码
import pandas as pd
import matplotlib.pyplot as plt
data = pd.read_excel(r'C:/Users/Lenovo/Desktop/数据.xlsx',index_col = 0) # 设置导入数据的路径
data.head()
print(data)
data.plot(figsize=(12,8))
plt.legend(bbox_to_anchor=(1.25,0.5))
plt.xlabel('Time')
plt.ylabel('Sales Volume')
plt.title('Monthly Sales Volume')
plt.show()
```这是一开始运行的结果

后来不知道点到什么,运行不出来了,显示成这个了
C:\Users\Lenovo\PycharmProjects\pythonProject6\venv\Scripts\python.exe C:\Users\Lenovo\PycharmProjects\pythonProject6\main.py
C:\Users\Lenovo\PycharmProjects\pythonProject6\main.py:1: DeprecationWarning:
Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
but was not found to be installed on your system.
If this would cause problems for you,
please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466
import pandas as pd
Traceback (most recent call last):
File "C:\Users\Lenovo\PycharmProjects\pythonProject6\venv\Lib\site-packages\pandas\compat_optional.py", line 135, in import_optional_dependency
module = importlib.import_module(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python311\Lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'openpyxl'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Lenovo\PycharmProjects\pythonProject6\main.py", line 3, in
data = pd.read_excel(r'C:/Users/Lenovo/Desktop/数据.xlsx',index_col = 0) # 设置导入数据的路径
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Lenovo\PycharmProjects\pythonProject6\venv\Lib\site-packages\pandas\io\excel_base.py", line 495, in read_excel
io = ExcelFile(
^^^^^^^^^^
File "C:\Users\Lenovo\PycharmProjects\pythonProject6\venv\Lib\site-packages\pandas\io\excel_
```