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.2.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.2-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pywencai-0.2.2.tar.gz
Algorithm Hash digest
SHA256 c6ccc80ed249b4f538e55268124f3f0fb4b0abbdb85ced803259b55f47cb65be
MD5 c224e18c45c84fa3d2b11bdbca0c9122
BLAKE2b-256 e161fca327488ba6ff731252714b9f37ddaa954160254136f2faa90d1f062b3d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pywencai-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ca55e70c83cf4b37ac9c57ecdabf119f99ad0595abda9601a16ea54c2ed0aab
MD5 8f4cf6c2e31067fb340ea98ee3706b6d
BLAKE2b-256 9727c2d4cac548fb7af97b85a3c4ab6d23d56d761bc92bbccc41784d123128d6

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