Git Product home page Git Product logo

Comments (7)

meenurajapandian avatar meenurajapandian commented on July 30, 2024 1

@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.

meenurajapandian avatar meenurajapandian commented on July 30, 2024

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.

DimMani avatar DimMani commented on July 30, 2024

@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.

CAVIND46016 avatar CAVIND46016 commented on July 30, 2024

Totally agree with @meenurajapandian , in this case, encoding = 'latin1' worked fine for me.

from dataset-examples.

aftab740 avatar aftab740 commented on July 30, 2024

@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.

CAVIND46016 avatar CAVIND46016 commented on July 30, 2024

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 avatar meenurajapandian commented on July 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.