Python | CSV to multiple JSON files (each row as a json file)

preview_player
Показать описание
In Pandas tutorials, we saw how to convert a csv to json object and write to a file. A question came up from the comments of that video where the ask was to have a separate json created for every row.

I am not using pandas for that. See how this can be done using a simple program in python.

If you like the video, do not forget to SUBSCRIBE to my channel. And ask your questions in comments section..
Рекомендации по теме
Комментарии
Автор

Thank you for this. I have one question.. you explained on known number of columns. My case i want to pass the no of columns dynamically. In this case how can we do that

HomeFoodByCouple
Автор

Hi, thank you for this video.
My question is what would be the data type of the values, once it is converted to json file?

santwanaanand
Автор

Suppose i have nested json file and a csv file.
I want to read a column values and search in nested json file one by one...
How can we do that?

akramshaikh
Автор

Hi, Please I got an error while trying to convert my csv file into Json files ( IndexError: list index out of range)

raqaqfatima-ezzahra
Автор

Hi how to write my Json file in separate package

jothilakshmi
Автор

Hai I need to convert each column into json

chandansingh-qllf
Автор

Hi, thanks for an amazing and very helpful tutorial! I would like to ask you what I'm doing wrong that I get "out of range error" while trying to convert file with 10 columns and 26 rows? *data={x[0]:y[0], x[1]:y[1], x[2]:y[2], x[3]:y[3], x[4]:y[4], x[5]:y[5], x[6]:y[6], x[7]:y[7], x[8]:y[8], x[9]:y[9], x[10].replace("\n", ""):y[10].replace("\n", "")}* Thank you and keep on awesome work.

janwinkler