Skip to main content

No project description provided

Project description

pywencai

获取同花顺问财数据

安装

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywencai-0.2.4.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pywencai-0.2.4-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file pywencai-0.2.4.tar.gz.

File metadata

  • Download URL: pywencai-0.2.4.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.2 Linux/5.15.0-1020-azure

File hashes

Hashes for pywencai-0.2.4.tar.gz
Algorithm Hash digest
SHA256 d2a842935ee1ade8d53ad72aaf6440e69919a1b0e19ae73ab5313cbc0035beca
MD5 9468831e6f250e46a14d78f8113bb89f
BLAKE2b-256 f7858cd91d1ed6ac3a8a92bce73d67c01aed159020a7eaf3fb1c9ae395b629c3

See more details on using hashes here.

File details

Details for the file pywencai-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: pywencai-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.2 Linux/5.15.0-1020-azure

File hashes

Hashes for pywencai-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 12520cf4e735e5a381f96d6a610cbea29372d0e318339aede23c7a577c7e38a0
MD5 c1548ff68bd38c37c5263641013ab92e
BLAKE2b-256 98efbb4fab23beb007279e34257494c0a5db8cbd7bd61ae3105192700cf7d796

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page