ipynb name 'pd' is not defined
时间: 2023-08-21 10:04:36 浏览: 157
请求/响应类型的数据交换-python中对错误nameerror: name ‘xxx’ is not defined进行总结
It seems like you are encountering an error in your Jupyter Notebook. The error message "name 'pd' is not defined" suggests that the variable 'pd' is not recognized or imported.
To resolve this issue, you need to import the necessary library before using it. In this case, it appears that you are trying to use the 'pd' alias for the pandas library.
You can import pandas by adding the following line at the beginning of your code:
```python
import pandas as pd
```
By importing pandas this way, you can use the 'pd' alias to access pandas functions and classes throughout your code.
阅读全文