jupyter notebook中怎麼讀取excel內容

時間 2022-03-29 02:12:31

1樓:笑嘻嘻

首先將excel檔案另存為csv格式檔案;

然後在jupyter notebook中寫入以下**:

import csv

filename = "c:/users/administrator/desktop/0515.csv"

with open(filename) as f:

reader = csv.reader(f)for row in reader:

print(reader.line_num,row)注意:filename中的檔名和位置記得轉為自己電腦對應下的檔名及位置

2樓:匿名使用者

鍵入命令jupyter notebook之後jupyter notebook服務就會啟動,並在電腦預設瀏覽器裡開啟首頁並顯示當前工作目錄的檔案在命令提示符視窗使用control-c

php中讀取字串前n個字元,PHP中讀取字串前N個字元

php中讀取字串前n個字元的 如下 str aaaaaaaaabbbbbbbbbbbbbbbb echo substr str 0 5 echo mb substr str 0 5 中文用 string mb substr string str int start int length string...

excel中不可讀取的內容怎麼解決

第一種解決方案 單擊是,通過修復或刪除不可讀取的內容,excel已經能夠開啟該檔案,下方就是出錯的行列。將xlsx檔案修改副檔名,改為zip壓縮檔案。雙擊zip檔案,開啟看看,注意,這裡不是解壓,開啟sharedstrings.xml檔案,自動彈出瀏覽器,無法顯示xml網頁。原來是標紅色的部分顯示 ...

c 用指標如何讀取檔案,c 中如何讀取檔案 並使用檔案中的資料

寫乙個讀取並顯示的函式 不理解你的意思,如果只是要讀檔案,使用fstream就好啦。fstream fin f 1.txt string str while fin.eof c 中如何讀取檔案 並使用檔案中的資料 1 在電腦上新建乙個資料夾,名稱叫txt2array。然後,開啟我們的devc 新建乙...

MFC中如何讀取 檔案中的陣列,MFC中如何讀取 txt檔案中的陣列

cstdiofile file new cstdiofile file.open filename,mode cstring str while file.readline str file.close 基本思路就是這樣,可能一些語法不太對,樓主再確認下 這麼規律的資料就很容易處理了。先readli...

php怎麼讀取js設定的,PHP 怎麼 讀取 JS 設定的 COOKIE

js document.cookie sn escape location.search path php echo cookie sn ps 不設定過期時間的 cookie 就是會話 cookie參考資料 http www.iscripts.org bbs forumdisplay.php?fid...