How to Convert CSV to JSON in Python

How to Convert CSV to JSON in Python

34,779 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@kelpie6902
@kelpie6902 - 01.08.2023 21:16

Thank you! You saved me from using pySpark

Ответить
@SkyOcean-lg7lt
@SkyOcean-lg7lt - 23.07.2023 22:51

What a God you are!

Ответить
@ProgramadorElectronicoYFisico
@ProgramadorElectronicoYFisico - 19.04.2023 07:12

y con un csv que se tiene en drive?

Ответить
@andrewburnley917
@andrewburnley917 - 06.01.2023 20:22

This is awesome!

Ответить
@RyanC119
@RyanC119 - 30.12.2022 16:01

Incredibly helpful and clearly explained. Thank you!

Ответить
@AndyArismendi
@AndyArismendi - 27.12.2022 05:28

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

Ответить
@chessketeer
@chessketeer - 15.12.2022 22:06

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

Ответить
@defaultname1700
@defaultname1700 - 22.11.2022 00:26

This video solved a myriad of problems, thanks

Ответить
@olatundeibrahim8355
@olatundeibrahim8355 - 08.11.2022 18:03

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

Ответить
@saucecode5544
@saucecode5544 - 22.10.2022 15:53

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

Ответить
@andrejsopsis6109
@andrejsopsis6109 - 07.09.2022 00:20

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

Ответить
@honaidaattaher4549
@honaidaattaher4549 - 24.07.2022 16:21

thank you so much

Ответить
@kaushikrana5680
@kaushikrana5680 - 02.04.2022 03:32

Hey , how to make multiple keys ?? Like :
{ "AB" :
{ "..." :
{ "..." :
{"..." , "....." }
}
}
}

Ответить
@mehakrani3614
@mehakrani3614 - 21.02.2022 00:45

can you convert csv to arff data format ?

Ответить
@xXCLAVERYXx
@xXCLAVERYXx - 30.11.2021 16:48

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

Ответить
@kyleb3316
@kyleb3316 - 18.11.2021 03:22

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

Ответить
@ola419rrie
@ola419rrie - 06.11.2021 06:23

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.

Ответить
@mankind770
@mankind770 - 02.11.2021 12:22

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

Ответить
@mankind770
@mankind770 - 02.11.2021 11:10

Awesome !!! Much thanks mate

Ответить
@ironfrogclark
@ironfrogclark - 24.10.2021 16:56

what IDE are you using?

Ответить
@bshubhankar
@bshubhankar - 28.09.2021 18:35

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

Ответить
@aravindjeffhardy
@aravindjeffhardy - 23.09.2021 21:35

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

Ответить
@KiranKumar-zb6ly
@KiranKumar-zb6ly - 15.09.2021 12:04

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

Ответить
@henriquebalzani1563
@henriquebalzani1563 - 03.09.2021 00:10

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

Ответить
@manmeetkaur4472
@manmeetkaur4472 - 20.08.2021 05:34

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?

Ответить
@14silber
@14silber - 26.04.2021 08:43

Thanks for your video

Ответить
@KhalilYasser
@KhalilYasser - 08.03.2021 07:17

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

Ответить
@LimpiaPeceras
@LimpiaPeceras - 05.03.2021 22:23

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

Ответить
@JoeCole_social
@JoeCole_social - 26.02.2021 20:56

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.

Ответить
@amitdighe1
@amitdighe1 - 10.02.2021 01:52

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?

Ответить