總結

Intermediate Python for Finance

Kennedy Behrman

Data Engineer, Author, Founder

第 1 章

  • 表示時間

datetime

  • 對應資料

dict()

Intermediate Python for Finance

第 2 章

  • 比較運算子

< <= > >=

  • 等值運算子

== !=

  • 布林運算子

and or not

  • if 敘述
if a < b:
   print(a)
  • 迴圈
while a < b:
     a = a + 1
for a in c:
    print(a)
Intermediate Python for Finance

第 3 章

  • 建立 DataFrame
DataFrame(data=data)
pd.read_csv('/data.csv')
  • 存取資料
stocks.loc['a', 'Values']
stocks.iloc[2:22, 12]
  • 聚合與摘要
stocks.mean()
stocks.median()
  • 擴充與操作
pce['PCESV'] = pcesv
gdp.apply(np.sum, axis=1)
Intermediate Python for Finance

第 4 章

  • 快速瀏覽
aapl.head()
aapl.tail()
aapl.describe()
  • 篩選
mask = prices.High > 216
prices.loc[mask]
  • 繪圖
exxon.plot(x='Date', 
           y='High' )
Intermediate Python for Finance

恭喜!

Intermediate Python for Finance

Preparing Video For Download...