总结

Python 金融进阶

Kennedy Behrman

Data Engineer, Author, Founder

第 1 章

  • 表示时间

datetime

  • 映射数据

dict()

Python 金融进阶

第 2 章

  • 比较运算符

< <= > >=

  • 等值运算符

== !=

  • 布尔运算符

and or not

  • if 语句
if a < b:
   print(a)
  • 循环
while a < b:
     a = a + 1
for a in c:
    print(a)
Python 金融进阶

第 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)
Python 金融进阶

第 4 章

  • 预览
aapl.head()
aapl.tail()
aapl.describe()
  • 筛选
mask = prices.High > 216
prices.loc[mask]
  • 绘图
exxon.plot(x='Date', 
           y='High' )
Python 金融进阶

恭喜!

Python 金融进阶

Preparing Video For Download...