Comments (6)
Traceback (most recent call last):
File "preprocess_data.py", line 80, in
main()
File "preprocess_data.py", line 60, in main
pd_joined = fdc_dm.join_data()
File "/home/work/phd/FoodOntology/preprocess/fdc_data_manager.py", line 79, in join_data
pd_joined = self.fdc_data_dic['food'].join(
KeyError: 'food'
I encounter this KeyError when running run.sh. This should be related to one of the packages in preprocess imported in preprocess_data.py.
from love.
Unfortunately, I cannot reproduce that bug. The issue you are having has nothing to do with any packages being imported. If you read the code FdcDataManager._load_data(), self.fdc_data_dic is a dictionary where the key is filename and the value is the pd.DataFrame. The fact that you encountered KeyError means that 'food' was not filled up correctly in _load_data(). This means that your data directory was not setup properly.
I am very certain this has to do with you not being able to download the CSV files from FDC using ./download_fdc.sh. I highly suggest you downloading the data from FDC again, and running the script.
from love.
Thanks Jason. I have already erased the whole directory and re-run ./run.sh. The error persists.
from love.
Let's see the code in person. Please let me know when you'll be in the lab today.
from love.
I will be available at about 6 pm.
from love.
I'll see u then
from love.
Related Issues (2)
- File Missing Error HOT 2
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 love.