我试图从我的电脑上的本地源阅读csv文件,但它显示以下内容:
sales = pd.read_csv('C:/Users/Admin/Documents/survey_results_public. csv')
Name错误Traceback(most recent call last)Cell In[7],line 1 -> 1 sales=pd.read_csv('C:/Users/Admin/Documents/survey_results_public. csv')
Name错误:名称'pd'未定义
I tried reading a csv file from a local source on my pc but it was unable to read the fiie.
个字符
1条答案
按热度按时间f1tvaqid1#
你必须预先安装pandas(pip install pandas)并在使用它的read_csv函数之前将其导入为pd。
字符串