I'm very pleased it helped you! Right now, I just use Paypal's donation: www.paypal.com/donate/?cmd=_donations&business=AZ73QW52SUX8N¤cy_code=USD&source=url Thanks for the contribution!
Hi! Thanks for the video. I have one error when I try to read the json "'utf-8' codec can't decode byte 0xff in position 0: invalid start byte". Could you help me? Thanks
Hi! It is hard to tell without seeing your data, but it sounds like an encoding error. You will need to figure out what encosing your data is using and load it as that rather than utf-8 or pass an error arugment to skip characters that return an error.
Hi, its a great code but I have a question here, If I want the output as {Bob:28, Fred:32, Jim:35}.... Don't want the header as keys.......just want both the columns as keys and values in one dictionary. How can I do that?
Awesome. Thank you very much. In the json output I noticed that the numbers are like strings. How can I make numbers as integers (without quotations in the json output)?
@@KhalilYasser Of course. So line 10 I would change row[1] to int(row[1]) --- I haven't tested this, but that will convert any instance of a string to an integer
Thanks! I do not at the moment. The process will work the same regardless of the data structure. It is just a matter of accessing the nested data via Python.
Thanks for your video, the only problem I am facing here is after the conversion, the order of the fields is not maintained in JSON file as of CSV. Do you have any workaround on that?
Thanks for the tutorial. Even after 2 years, this video was useful. Now I can use this to create api's
No problem! You can also use pandas. I have been thinking of doing that video too
Incredibly helpful and clearly explained. Thank you!
This video solved a myriad of problems, thanks
So happy to hear that!
Awesome !!! Much thanks mate
OMG!! thank you... Just what I needed it
Glad it helped!
This saved me so much time thank you so much! please consider some sort of tip jar so I can contribute and support your efforts.
I'm very pleased it helped you! Right now, I just use Paypal's donation: www.paypal.com/donate/?cmd=_donations&business=AZ73QW52SUX8N¤cy_code=USD&source=url Thanks for the contribution!
Thnak you , at most about last minute without "names"
Very clear, very helpful, very simple, very GREAT.
Sir what we want to do if we want to convert only particular columns of csv file into json. plz reply quickly
This is awesome!
Very Nice, It helped me a lot. Thank you so much
Hi! Thanks for the video. I have one error when I try to read the json "'utf-8' codec can't decode byte 0xff in position 0: invalid start byte". Could you help me? Thanks
Hi! It is hard to tell without seeing your data, but it sounds like an encoding error. You will need to figure out what encosing your data is using and load it as that rather than utf-8 or pass an error arugment to skip characters that return an error.
Hi, its a great code but I have a question here, If I want the output as {Bob:28, Fred:32, Jim:35}.... Don't want the header as keys.......just want both the columns as keys and values in one dictionary. How can I do that?
Hello. This method is not working for csv file with larger number of rows and columns. Can someone please assist?
If you are familiar with pandas, you can load it up in pandas with read csv and then save it with to json. Remmeber to set index to False
Is this method okay for when working with large set of data. I mean getting the row number might not be always easy
Hi Thanks for this but how could I limit the size as Im using a large dataset and only really want about 1000 records.
Text size is very small. Difficult to read text on mobile screen.
can you convert csv to arff data format ?
Awesome. Thank you very much.
In the json output I noticed that the numbers are like strings. How can I make numbers as integers (without quotations in the json output)?
Good question. Before outputting to JSON, insure that your integer or float is not a string by converting it with int("STRING GOES HERE") or float()
@@python-programming Can you guide me on what line should I modify? Do you mean in that part `int(row[1]`
@@KhalilYasser Of course. So line 10 I would change row[1] to int(row[1]) --- I haven't tested this, but that will convert any instance of a string to an integer
@@python-programming Amazing. I have tested and it worked well. Thank you very much.
@@KhalilYasser Yay! Excellent. Glad I could help. No worries at all.
y con un csv que se tiene en drive?
Great tutorial, do you have another where you go into more nested dictionaries?
Thanks! I do not at the moment. The process will work the same regardless of the data structure. It is just a matter of accessing the nested data via Python.
Thanks for your video, the only problem I am facing here is after the conversion, the order of the fields is not maintained in JSON file as of CSV. Do you have any workaround on that?
Hmmm... can you paste a sample of the json and the csv?
What a God you are!
Thanks for this tutorial, what if our CSV file had more rows and we wanted to append some of the rows to form nested dictionaries.
what IDE are you using?
Atom for this video
I know this is a python tutorial but for what it's worth, the equivalent in powershell: @{Names = (Import-Csv names.csv)} | ConvertTo-Json
Thanks for your video
thank you so much
Hey , how to make multiple keys ?? Like :
{ "AB" :
{ "..." :
{ "..." :
{"..." , "....." }
}
}
}
Csv files are not good at storing this type of data structure. You are better off leaving it as a JSON file.