jupyter怎么打开本地文件 jupyternotebook中怎么读取excel内容?

jupyternotebook中怎么读取excel内容?首先,将excel文件另存为CSV文件;然后在jupyter笔记本中编写以下代码:导入CSV文件名=“C/users/administrator

jupyternotebook中怎么读取excel内容?

首先,将excel文件另存为CSV文件;

然后在jupyter笔记本中编写以下代码:

导入CSV

文件名=“C/users/administrator/desktop/0515。CSV“

打开(文件名)为F:

读卡器=csv.reader文件(f)

对于读卡器中的行:

打印(读卡器.line首先,在下表中输入文件名和相应的文件名:pdlinux]=pd.readexcel(“2007.xlsx”)X=数据集.iloc[:,:-1].valuesY=数据集.iloc[:, 3]. 值数据集按shift enter运行