@johnkid @初冰暖阳
您好,感谢你们发现问题,这个我们核实一下,之后会在这里at你们,反馈结果。
您这种直接拼接很多时候会引起错误,最好的方法是按照index做拼接更好一些。
```
def get_pe(code,date):
stocks = get_index_stocks(code, date)
q = query(valuation.code,valuation.pe_ratio).filter(valuation.code.in_(stocks))
return get_fundamentals(q, date)
import pandas as pd
code = '000827.XSHG'
df_pe1 = get_pe(code,'2017-03-06')
df_pe1.set_index(df_pe1.code.values, inplace=True)
df_pe2 = get_pe(code,'2017-03-07')
df_pe2.set_index(df_pe2.code.values, inplace=True)
dnf = pd.concat([df_pe1['pe_ratio'],df_pe2['pe_ratio']],axis = 1)
dnf.columns = ['20170306', '20170307']
dnf
```
2017-03-11