skills/tushare-data-1.0.5/references/数据接口/宏观经济/国内宏观/国民经济/国内生产总值(GDP).md
wangyitong a65adcc2e5 Initial commit: merged, deduplicated, and vetted skill collection
Sources: extracted from two upstream archives (skill-repo, skills-main),
merged with the following policy:

- 15 broken symlinks (pointing to /Users/jameslee/.cc-switch/skills or
  ../../.agents/skills on a foreign machine) discarded
- 3 real name collisions with identical content (ai-pair, ifind-http-api,
  zhipu-websearch) kept as one copy
- Functional overlaps deduped keeping the strongest variant:
  - docx family: kept docx (official, full toolchain) + docx-cn
    (GB/T 9704 Chinese official-document constants),
    dropped docx_writer (no scripts, name collided with docx)
  - humanizer family: kept humanizer-zh (6 zh reference docs),
    dropped humanizer (en, redundant for CN workflow)
- Skills that only ran in a foreign environment removed:
  ablemind-ops, app-publish, hlb-design-system, openclaw-adj-skill,
  claude-driver
- alphapai excluded from this public repo because its SKILL.md hard-coded
  live credentials

Result: 25 skills, 572 files, ~7.5 MB.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 14:47:12 +08:00

72 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## GDP数据
----
接口cn_gdp
描述获取国民经济之GDP数据
限量单次最大10000一次可以提取全部数据
权限用户积累600积分可以使用具体请参阅[积分获取办法](https://tushare.pro/document/1?doc_id=13)
<br>
<br>
**输入参数**
名称 | 类型 | 必选 | 描述
---- | ----- | ---- | ----
q | str | N | 季度2019Q1表示2019年第一季度
start_q | str | N | 开始季度
end_q | str | N | 结束季度
fields | str | N | 指定输出字段e.g. fields='quarter,gdp,gdp_yoy'
<br>
<br>
**输出参数**
名称 | 类型 | 默认显示 | 描述
--- | ---- | ---- | ----
quarter | str | Y | 季度
gdp | float | Y | GDP累计值亿元
gdp_yoy | float | Y | 当季同比增速(%
pi | float | Y | 第一产业累计值(亿元)
pi_yoy | float | Y | 第一产业同比增速(%
si | float | Y | 第二产业累计值(亿元)
si_yoy | float | Y | 第二产业同比增速(%
ti | float | Y | 第三产业累计值(亿元)
ti_yoy | float | Y | 第三产业同比增速(%
<br>
<br>
**接口调用**
```python
pro = ts.pro_api()
df = pro.cn_gdp(start_q='2018Q1', end_q='2019Q3')
#获取指定字段
df = pro.cn_gdp(start_q='2018Q1', end_q='2019Q3', fields='quarter,gdp,gdp_yoy')
```
<br>
**数据样例**
quarter gdp gdp_yoy pi pi_yoy si si_yoy ti ti_yoy
0 2019Q4 990865.1000 6.10 70466.7000 3.10 386165.3000 5.70 534233.1000 6.90
1 2019Q3 712845.4000 6.20 43005.0000 2.90 276912.5000 5.60 392927.9000 7.00
2 2019Q2 460636.7000 6.30 23207.0000 3.00 179122.1000 5.80 258307.5000 7.00
3 2019Q1 218062.8000 6.40 8769.4000 2.70 81806.5000 6.10 127486.9000 7.00
4 2018Q4 900309.5000 6.60 64734.0000 3.50 366000.9000 5.80 469574.6000 7.60
.. ... ... ... ... ... ... ... ... ...
147 1956Q4 1028.0000 15.00 443.9000 4.70 280.7000 34.50 303.4000 14.10
148 1955Q4 910.0000 6.80 421.0000 7.90 222.2000 7.60 266.8000 4.60
149 1954Q4 859.0000 4.20 392.0000 1.70 211.7000 15.70 255.3000 -0.60
150 1953Q4 824.0000 15.60 378.0000 1.90 192.5000 35.80 253.5000 27.30
151 1952Q4 679.0000 None 342.9000 None 141.8000 None 194.3000 None