wukan1986 / kquant_data Goto Github PK
View Code? Open in Web Editor NEW量化数据下载更新工具,请参考ddump项目
License: BSD 2-Clause "Simplified" License
量化数据下载更新工具,请参考ddump项目
License: BSD 2-Clause "Simplified" License
根据下面的错误信息,我修改了dzh.py的dividend_to_h5()函数与h5.py的write_dataframe_set_struct_keep_head()函数,就可以了。
请确认一下。
====dzh.py=============
def dividend_to_h5(input_path, data):
del data['index_datetime'] #增加了这一行
write_dataframe_set_struct_keep_head(input_path, data, dzh_h5_type, 'Dividend')
return
====h5.py===============
def write_dataframe_set_struct_keep_head(path, data, dtype, dateset_name):
"""
保存DataFrame数据
保留表头
可以用来存K线,除权除息等信息
:param path:
:param data:
:param dtype:
:param dateset_name:
:return:
"""
f = h5py.File(path, 'w')
r = data.to_records(index=False) #增加了index=False
d = np.array(r, dtype=dtype)
f.create_dataset(dateset_name, data=d, compression="gzip", compression_opts=6)
f.close()
return
===============下面是错误信息==============
b'SZ300520'
structures must have the same size
b'SH600616'
structures must have the same size
b'SZ002695'
structures must have the same size
structures must have the same size
如题,谢谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.