Comments (14)
There is no error for me running this code. Can you offer some more information?
What do your mean by "this particular number"?
from jpstat.
This statsDataId number as well as other numbers brings up this error while other numbers work fine.
from jpstat.
Again this "0003443407" works for me. Can your provide "other numbers" that create this error?
from jpstat.
Well so far all the numbers under the National Survey of Family Income, Consumption and Wealth haven't worked like 0003443428, 0003443450.
I was able to get data from Machinery Orders without any problems. For Labour Force Survey some work, some don't.
from jpstat.
If this helps, this is the full error message
df[cat['@name']] = df[col_name].map(cat_map)
KeyError: '@name
from jpstat.
Ok now I find that this problem is due to some difference in the data structure when setting language to English.
A quick fix is to use lang=J
. I may find some time this weekend to fix this bug for this case.
from jpstat.
Yes, this fixed the problem. Thank you!
Look forward to the bug being fixed. Thanks!
from jpstat.
The solution of changing the language to Japanese has now caused this error:
note = pd.DataFrame(data['STATISTICAL_DATA']['DATA_INF']['NOTE'])
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'NOTE'
from jpstat.
Can you tell me the statsDataId
that you are trying to access? It seems that this dataset has a different structure comparing to others.
from jpstat.
My apologies. I made a mistake. I forgot that the English sets have different IDs than Japanese sets. I was trying an English ID number with the Japanese language.
But I can't get access to all the datasets in the English version.
from jpstat.
Well actually, maybe I have that incorrect. I am doing the following:
listt = jpstat.estat.get_list(statsCode="00100406")
listt @id STAT_NAME GOV_ORG STATISTICS_NAME TITLE SURVEY_DATE OPEN_DATE OVERALL_TOTAL_NUMBER 0 0003446461 景気動向指数 内閣府 景気動向指数 長期系列 0 2023-04-27 5856 1 0003446462 景気動向指数 内閣府 景気動向指数 個別系列の数値 0 2023-04-27 18482 2 0003446463 景気動向指数 内閣府 景気動向指数 個別系列の寄与度 0 2023-04-27 14647
data, note = jpstat.estat.get_data(statsDataId="0003446461")
note = pd.DataFrame(data['STATISTICAL_DATA']['DATA_INF']['NOTE']) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^ KeyError: 'NOTE'
from jpstat.
You can try data = jpstat.estat.get_data(statsDataId="0003446461", return_note=False)
.
Each time you see there is an Error with Note
you can simply suppress outputting note.
from jpstat.
I also fix the problem with lang="E"
in the new version. Please update through pip and see if there is still any problems.
from jpstat.
Thanks! I upgraded the package and now English is working with this return_note=False argument. Thanks again!
from jpstat.
Related Issues (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 jpstat.