How to Convert CSV to JSON in Python

preview_player
Показать описание
In this video, I show you how to easily convert CSV files into JSON files.

If you enjoy this video, please subscribe. I provide all my content at no cost. If you want to support my channel, please donate via

If there's a specific video you would like to see or a tutorial series, let me know in the comments and I will try and make it.

You can follow me at:
Рекомендации по теме
Комментарии
Автор

Thanks for the tutorial. Even after 2 years, this video was useful. Now I can use this to create api's

saucecode
Автор

Thnak you, at most about last minute without "names"

andrejsopsis
Автор

This video solved a myriad of problems, thanks

defaultname
Автор

OMG!! thank you... Just what I needed it

henriquebalzani
Автор

Very clear, very helpful, very simple, very GREAT.

mathketeer
Автор

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.

JoeCole_social
Автор

Potentially a stupid question. Can you replace the “next” method with the actual header names as the “keys”?

AndreasMake
Автор

Sir what we want to do if we want to convert only particular columns of csv file into json. plz reply quickly

KiranKumar-zbly
Автор

Very Nice, It helped me a lot. Thank you so much

aravindjeffhardy
Автор

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 want both the columns as keys and values in one dictionary. How can I do that?

manmeetkaur
Автор

Hi Thanks for this but how could I limit the size as Im using a large dataset and only really want about 1000 records.

xXCLAVERYXx
Автор

I know this is a python tutorial but for what it's worth, the equivalent in powershell: @{Names = (Import-Csv names.csv)} | ConvertTo-Json

AndyArismendi
Автор

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

LimpiaPeceras
Автор

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
Автор

Is this method okay for when working with large set of data. I mean getting the row number might not be always easy

mankind
Автор

Hello. This method is not working for csv file with larger number of rows and columns. Can someone please assist?

olatundeibrahim
Автор

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.

olarrie
Автор

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?

amitdighe
Автор

Text size is very small. Difficult to read text on mobile screen.

Shubhankar.Banerjee
Автор

Great tutorial, do you have another where you go into more nested dictionaries?

kyleb
visit shbcf.ru