Skip to content

Instantly share code, notes, and snippets.

@adxrgh
Last active May 24, 2017 07:53
Show Gist options
  • Save adxrgh/edbe8edb4ee1a75180de84f2b348c6ff to your computer and use it in GitHub Desktop.
Save adxrgh/edbe8edb4ee1a75180de84f2b348c6ff to your computer and use it in GitHub Desktop.
[加权排序盘面]#tags:看盘
import tushare as ts
a=ts.get_today_all()
x=(a.changepercent*a.nmc)/a.nmc.sum()
a['weight']=x
a.sort(['weight'],ascending=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment