[問題] pandas操作問題

看板Python作者 (granly)時間8年前 (2017/03/08 03:07), 編輯推噓5(501)
留言6則, 5人參與, 最新討論串1/1
xxx=pandas.read_csv xxx.head() 無顯示數據 print(xxx.head()) 有顯示 請問有人知道為什麼要用print嗎? 我看十分鐘學pandas這個教程都沒使用...我是用pycharm在寫,笨問題請教...謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 27.246.167.199 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1488913641.A.6A9.html

03/08 03:16, , 1F
print 才能輸出到 standard out
03/08 03:16, 1F

03/08 04:06, , 2F
如果你是在jupyter notebook ,如果指定t=xxx.head(),再
03/08 04:06, 2F

03/08 04:06, , 3F
打一個t就可以了
03/08 04:06, 3F

03/08 11:05, , 4F
用 jupyter 時 xxx.head() 才會顯示
03/08 11:05, 4F

03/08 11:59, , 5F
交談式介面才會自動幫你print
03/08 11:59, 5F

03/08 14:02, , 6F
如果你是用pycharm的console xxx.head()應該會有
03/08 14:02, 6F
文章代碼(AID): #1OlmJfQf (Python)
文章代碼(AID): #1OlmJfQf (Python)