well-living / jpy-datareader Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
For some datasets, like https://www.e-stat.go.jp/dbview?sid=0003353946 ,
jdr.get_data_estat_statsdata(api_key, statsDataId="0003353946")
fails with an error
Key Error: 'Level 表章項目名 not found'
at line
df = df.set_index([c for c in df.columns if "name" in c]).unstack(self.tabcol)
in denormalizer
. It appears not all datasets have the self.tabcol
column.
【概要】
GithubのREADME.mdに記載の
import jpy_datareader as jdr
api_key = "Your_Application_ID"
statslist = jdr.get_data_estat_statslist(api_key)
を実行すると、以下のエラーが出力される。
File ~/.pyenv/versions/3.10.4/envs/jquants/lib/python3.10/site-packages/jpy_datareader/estat.py:230, in StatsListReader._read_one_data(self, url, params)
228 if "PARAMETER" in out["GET_STATS_LIST"].keys():
229 if "LANG" in out["GET_STATS_LIST"]["PARAMETER"].keys():
--> 230 self.LANG = out["GET_STATS_LIST"]["RESULT"]["LANG"]
231 if "DATA_FORMAT" in out["GET_STATS_LIST"]["PARAMETER"].keys():
232 self.DATA_FORMAT = out["GET_STATS_LIST"]["RESULT"]["DATA_FORMAT"]
KeyError: 'LANG'
【原因】
エラー文の矢印箇所の右辺における、out["GET_STATS_LIST"]["RESULT"]
に"LANG"
のkeyがないことが原因と考えられる。
statsdata = estat.StatsDataReader(
api_key,
statsDataId="0003427113",
name_or_id="name",
cdTab='1',
lvTime='1',
)
AttributeError: 'StatsDataReader' object has no attribute 'lvAlvTimerea'
estat.py
の588行目の誤字が原因。
pdict.update({"lvTime": self.lvAlvTimerea})
当方にて、インストールしたファイルを書き換えることで動作することを確認済み。
#15 のバグに当たり困っているのですが、リリースバージョンに含まれていないだけで、すでにmainブランチでは修正済みであることが分かりました。
修正版リリースの予定はありますでしょうか?
Thank you for developing a great library.
Is there any search function to obtain target statsDataId...?
We want to search target statsDataId automatically to fetch target values.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.