Giter Site home page Giter Site logo

kquant_data's People

Contributors

wukan1986 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kquant_data's Issues

在anaconda有的环境报错(structures must have the same size)

根据下面的错误信息,我修改了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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.