Giter Site home page Giter Site logo

pywencai's Introduction

pywencai

获取同花顺问财数据

环境依赖

由于程序中执行了js代码,请先保证已安装了Node.js

未安装请自行安装

安装

pip install pywencai

Demo

import pywencai

res = pywencai.get(question='退市股票', sort_key='退市@退市日期', sort_order='asc')
print(res)

demo.ipynb

API

get(**kwargs)

根据问财语句查询结果

参数

question

必填,查询问句

sort_key

非必填,指定用于排序的字段,值为返回结果的列名

sort_order

非必填,排序规则,至为asc(升序)或desc(降序)

page

非必填,查询的页号,默认为1

perpage

非必填,每页数据条数,默认值100,由于问财做了数据限制,最大值为100,指定大于100的数值无效。

loop

非必填,是否循环分页,返回多页合并数据。默认值为False,可以设置为True或具体数值。

当设置为True时,程序会一直循环到最后一页,返回全部数据。

当设置具体数值n时,循环请求n页,返回n页合并数据。

返回值

该方法返回一个pandasDataframe

联系方式

欢迎加入飞书群,群内有大量量化资料分享

pywencai's People

Contributors

zsrl avatar

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.