df.plot.hist()與df.hist()的差異
2019/04/25 上午 09:13
機器學習共學討論版
蔡鳳駿
觀看數:14
回答數:2
收藏數:0
ml100-2
df.plot.hist()
df.hist()
ml100-2-d06
網路上的解釋是
df.plot.hist()的只繪出一列的dataframe
而df.hist()是繪出整個dataframe
不知道這樣理解對不對
另外為什麼利用兩個呼叫在繪製day6的days_employed會一樣呢?
回答列表
-
2019/04/25 上午 10:03張維元 (WeiYuan)贊同數:0不贊同數:0留言數:0
根據官方文件的寫法:
DataFrame.plot.hist => Draw one histogram of the DataFrame’s columns.
DataFrame.hist =>Make a histogram of the DataFrame’s.
印出來結果如下:
-
2019/04/25 上午 10:06張維元 (WeiYuan)贊同數:0不贊同數:0留言數:2
可以問一下你的 day6 的 days_employed 是怎麼畫的呢?是不是你一開始就限定 df['days_employed'] 這個欄位了?