Comments (7)
@mattdee @meenurajapandian After making the above changes I get this:
UnicodeEncodeError: 'charmap' codec can't encode character '\x9c' in position 112: character maps to
any thoughts on how to fix this?
You need to include the encoding in every place that you have used the open() function. There are 3 places where they need to be included.
from dataset-examples.
Thank you! Also, it worked for me only after I changed line 26 and line 17 to this:
with open(json_file_path, encoding="utf-8") as fin:
from dataset-examples.
@mattdee @meenurajapandian After making the above changes I get this:
UnicodeEncodeError: 'charmap' codec can't encode character '\x9c' in position 112: character maps to
any thoughts on how to fix this?
from dataset-examples.
Totally agree with @meenurajapandian , in this case, encoding = 'latin1' worked fine for me.
from dataset-examples.
@meenurajapandian, i have python 3.6 and newbie to this language. Can you please help me how to set the json file path. I want to convert yelp data set. Please help with the full syntax.i will be very thankful to you. I need fully running code.
from dataset-examples.
Slightly simpler version of json to csv conversion script can be found here: https://github.com/CAVIND46016/Yelp-Dataset-Analysis/blob/master/json_to_csv.py
I have hard-coded the paths, so it should be simple to follow...
from dataset-examples.
@meenurajapandian, i have python 3.6 and newbie to this language. Can you please help me how to set the json file path. I want to convert yelp data set. Please help with the full syntax.i will be very thankful to you. I need fully running code.
From the terminal, you can run the command
$ python json_to_csv_converter.py yelp_academic_dataset.json
if the files are in the current directory or mention the path instead
$ python json_to_csv_converter.py path/yelp_academic_dataset.json
This is given in the documentation of the code.
from dataset-examples.
Related Issues (20)
- More/Fewer total reviews per business than in 'review_count'
- where is the label if review is positive or negative?
- json_to_csv_converter.py has a small issue for the new yelp dataset HOT 1
- What's the meaing of each column heading ?
- question about date availability for business in NYC HOT 2
- Review_count HOT 1
- Get Yelp original json file HOT 1
- Check-in data is not user-related? HOT 1
- missing attribute in category_predictor.py HOT 1
- Is the first entry in the variable “categories” the superordinate category?
- business.json is not converted to business.csv HOT 2
- Broken links in README HOT 2
- Question regarding the time zones in the review.json file HOT 1
- 'NoneType' object is not subscriptable error when yelp_academic_dataset_business.json conversion
- Citation issue
- Including not recommended reviews
- Convert JSON to CSV: Missing module source and missing undefined variable
- Extract review.json file from yelp_academic_dataset.json
- Can I know which photo belongs to which review
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 dataset-examples.