# 5/2筆記 ## 直方圖 ```python= #總收入與人數 sum=dfIncome['Income'].sum() n=dfIncome['Income'].count() print(f'總和={sum}, 樣本數={n}') #直方圖 plt.hist(dfIncome['Income'], bins=range(0, 100000, 1000)) plt.show() ```  ## Dataframe ```python= import pandas as pd import numpy as np import matplotlib.pyplot as plt #程式追蹤方式:你可以逐步執行,並看看執行結果怎樣。 #讀取雲端硬碟中的excel檔 #雲端硬碟的路徑如何對應到/content/drive/My Drive/___TestData/ #宣告一個變數成為特定的容器型態,在這個變數內可以存放很多值(數值、文字、物件) #這些容器包括:串列、字典、集合...等 #dataframe是pandas套件所創造容器,它像是「表格」 #pd.read_excel()回傳一個dataframe dfIncome ```  ## 其他補充 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up