Comments (7)
预测值:国际不同金融机构针对不同类型数据会展开独立的预期调查,金十数据发布的数据预期值通常引自路透社;
这个预测值是单个机构预测的,不具备普适性,所以没有计划获取预测值的数据
from akshare.
请问有没有可能做成默认=cpi历史值,但如果加参数就可以同时抓取预测值?
from akshare.
请问有没有可能做成默认=cpi历史值,但如果加参数就可以同时抓取预测值?
因为很多其他类似的接口没用预测值,批量修改不显示,建议您在使用的时候修改下源码部分获取
from akshare.
谢谢。有没有什么参考?
from akshare.
def macro_china_cpi_yearly():
"""
**年度CPI数据, 数据区间从19860201-至今
https://datacenter.jin10.com/reportType/dc_chinese_cpi_yoy
:return: pandas.Series
"""
t = time.time()
res = requests.get(
JS_CHINA_CPI_YEARLY_URL.format(
str(int(round(t * 1000))), str(int(round(t * 1000)) + 90)
)
)
json_data = json.loads(res.text[res.text.find("{") : res.text.rfind("}") + 1])
date_list = [item["date"] for item in json_data["list"]]
value_list = [item["datas"]["**CPI年率报告"] for item in json_data["list"]]
value_df = pd.DataFrame(value_list)
value_df.columns = json_data["kinds"]
value_df.index = pd.to_datetime(date_list)
temp_df = value_df["今值(%)"] # just fix 今值(%) --> 预测值(%)
temp_df.name = "cpi"
return temp_df
from akshare.
just fix 今值(%) --> 预测值(%)
from akshare.
thanks!
from akshare.
Related Issues (20)
- AKShare 接口问题报告 HOT 1
- AKShare 接口问题报告 HOT 2
- 上证指数,没有2024之前的分钟级别历史数据,希望能获取到 HOT 1
- [bug] HOT 1
- macro_china_bond_public接口异常 HOT 1
- AKShare 接口问题报告-stock_tfp_em和news_trade_notify_suspend_baidu HOT 1
- 美股财报接口 HOT 3
- AKShare 接口问题报告 HOT 2
- How to acquire the US stock financial data HOT 2
- AKShare 接口问题报告 HOT 1
- stock_intraday_em 在 9:00 ~9:15之间调用会报错 HOT 2
- 希望提供期货交割日,期权交割日,富时A50期货交割日等一系列特殊日期的接口 HOT 1
- AKShare 接口问题报告 HOT 1
- forbes_rank 无法获取2023年数据 HOT 1
- 希望添加当日东方财富财经早餐获取接口 HOT 3
- 希望提供实时内外盘等数据 HOT 1
- AttributeError: 'DataFrame' object has no attribute 'map'. HOT 1
- AKShare 接口问题报告 HOT 1
- pandas版本升级后兼容问题 HOT 1
- futures_hog_info()接口报错,请帮忙修复,多谢! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akshare.