JSON is one of the most popular data interchangeable formats for exchanging browser-server information. This tutorial explains everything about handling json data with Python.
Exact answer to my problem! If anyone is searching for the title of this video, THIS is the video to watch! I've spent days trying to grasp this (apparently) very simple concept. You've made it crystal clear! A thousand 'thanks'.
Hi i have a CSV file which has strings numbers boolean and null values. I have written a code to convert csv file to json. When i get the out file in json format i see that Numbers, boolean are coming in " " (example "TRUE", "10" for null values " " etc) need help on how to handle this
What if you have two JSON files where one is missing some keys? How can you do this for multiple JSON files with inconsistent data? Now that would be a realistic scenario.
what if I have the data set given to me in a JSON file instead of extracting data from the net. How do I convert the dictionary dataset to strings for further parsing and tokenizing it!!
How can I loop or iterate 0 to Maximum number object to print it's specific object items. Say I have A array, inside it has 0 to n max number of objects, and inside this another object which I wanna print. So for each 0...n max number object I will have n number of "text" file so I wanna print it from JSOn, how can I do this?
Then we don't need ETL process, we can work with Data directly (less space and less time to access the data) => more memory? There is a memory limitation in a dict variable? Thank you!
how can i save json data={'temp':'14', 'humi':'12' (and ect)} to csv file? im not reading another file im just getting every few minutes json like this and i want to save it csv file, any idea how?
Hi Lenin, This video is very helpful - Thank you! I am dealing with a json file that is 9GB and getting a few errors. Is there anyway I could contact you to discuss some specifics?
Good. How to read a JSON file and write it into a text file?! With out mentioning the column names explicitly in the python code. How to pick N number of columns and generate a file with N number of columns...
The idea of using type is good it makes u have a better understanding of how things are working. i also wrote some code import json data={ 'name':'TCS', 'shares': 1024, 'prices': 244000 } print(type(data)) # json_str = json.dumps(data, indent=4) print(json_str) print(type(json_str)) #
Hello, Thanks for the video to explaining the json handling for pythion, I have a question about when I got the file including few json content inside, how to separate the the file at end of each json (like at the end of the json of each line have a "}}"), and what I need to do if we only need to process the fist json content ?
when I print my json file I get error : File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\json\__init__.py", line 293, in load return loads(fp.read(), AttributeError: 'str' object has no attribute 'read' how to fix it?
@@PyLenin Thanks for your prompt response Lenin but while I wrote import json it's having no probs but when I am trying to read a json file its saying there in no name called ....this file does not exist...also I need to read 300 json files to read at a go...plz help....completely naive me in ds :)0 so plz
@@krittwikakar7520 may be your python file and json does are not in the same folder. You need to mention the correct folder location for your json files.
`json.dump...` doesn't need to be assigned to `data_serialized`. The `json.dump` function returns a `None`. The last line of your code, you can remove `data_serialized =` and the scripts would work the same.
Thank you for the informative tutorial about handling JSON via API. I have a question about understanding "metadata". please follow this link for example I am providing: www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=5min&apikey=demo In that link, first thing you will see are "metadata" with 6 different variables. In python, If I want to create column that specified 3 types. How is it possible? I am just curious because some JSON file does not have METADATA in it like in the link shown. Thanks!
Hello everyone!! For more insightful articles on Python and Data Engineering, join Pylenin's official Telegram channel.
t.me/pythonwithpylenin
Exact answer to my problem! If anyone is searching for the title of this video, THIS is the video to watch! I've spent days trying to grasp this (apparently) very simple concept. You've made it crystal clear! A thousand 'thanks'.
My pleasure !!
Thanks Lenin. Totally what I was looking for and understood it all first time - you explain it really well. :)
I just want to say thank you so much!! you are a great teacher and i've learned a lot from you thus far!
Appreciate your compliments dear. Do share this video with your friends and colleagues who might need it. ❤️❤️❤️
Thank you, everything was explained properly, it helped fix a syntax error was running into
I love your tutorial. Thank you for making it so easy for me to understand! Looking forward to learning more from you!
Thank you !!
You make it so easy to follow and understand, thank you very much!!
Brilliant explanation and structure! Thank you!
Wow God bless you brother, so clear and easy to follow i love it. I subscribed instantly even before finishing the video
I love your tutorials!
We need more videos of this type..Thanks 👌
Very nicely done, thank you, I really enjoyed watching this video.
Great explanation, thank you!
Nice presentation and tutorial
Very well explained. Clear my doubt to read JSON file.Thanks a lot
Mission accomplished :-) Do watch other videos and share your feedback !!
please tell me how he make the data in multipleline 3:00
Can I get the link for “request library “ i.e., the next tutorial that you mentioned at 18:20 in your video?
Thank you for this very useful video!
love the tutorial, very underrated
Thanks man. Now it's upto you to share it
Great tutorial, thank you.
json format is copied to single line from quandl, how to go to multiple line. how did u do in vs code?
Thank you very much, very clear and concise explanation.
My pleasure man !! Do check out other videos and share it with your friends !
Thanks, man! Excellent explanation.
My pleasure man !! Keep watching other videos and share your opinion.
Very educative video thanks.
Nice explanation 👍
Hi i have a CSV file which has strings numbers boolean and null values. I have written a code to convert csv file to json. When i get the out file in json format i see that Numbers, boolean are coming in " " (example "TRUE", "10" for null values " " etc) need help on how to handle this
What if you have two JSON files where one is missing some keys? How can you do this for multiple JSON files with inconsistent data? Now that would be a realistic scenario.
what if I have the data set given to me in a JSON file instead of extracting data from the net. How do I convert the dictionary dataset to strings for further parsing and tokenizing it!!
Hi, I'm recieving data with u prefix I don't want it to be like that. can be considered as requirement ,
any suggestions?
Thank you Sir, you are a superb teacher.
Loved it bro .. Thanks
How to parse json dataset of 2GB?I am unable to load using json.load/json.loads.
Super helpful, Thank You!
My pleasure
How can I loop or iterate 0 to Maximum number object to print it's specific object items. Say I have A array, inside it has 0 to n max number of objects, and inside this another object which I wanna print. So for each 0...n max number object I will have n number of "text" file so I wanna print it from JSOn, how can I do this?
Thanks a lot for the knowledge. It was very usefull.
Then we don't need ETL process, we can work with Data directly (less space and less time to access the data) => more memory?
There is a memory limitation in a dict variable?
Thank you!
Thank you so much, man. I way you explain that I really like it. It really to the point.
Glad to hear it!
how can i save json data={'temp':'14', 'humi':'12' (and ect)} to csv file? im not reading another file im just getting every few minutes json like this and i want to save it csv file, any idea how?
which application you are using to do python coding?
great video brother.....thumbs up/......
You are a good teacher. Thanks
Your compliment means a lot. Thank you so much
Can you explain how do we walk through the JSON?
Hi Lenin, This video is very helpful - Thank you! I am dealing with a json file that is 9GB and getting a few errors. Is there anyway I could contact you to discuss some specifics?
Hi lenin,do you have rest api detail tutorial in list.plz help
Great, thanx for the Sharing.
very well explained!
Glad it was helpful!
Could you explain the difference between dump and dumps?
Thank you!
Great Explanation , thanks Keep going.
My pleasure mate !! means a lot.
please tell me how he make the data in multipleline 3:00
Good. How to read a JSON file and write it into a text file?! With out mentioning the column names explicitly in the python code. How to pick N number of columns and generate a file with N number of columns...
Hello, can you please make a tutorial on how to make a diff of two different json files and store the results in .json format? thanks!
Please make tutorial on open CV..
U taught so well.. please continue.
Making python data Engineer course
Sure mate
Please expalin how to compare two json files and display the difference between them
Please continue posting videos for aws and python,best explanation in yt !!
Thanks mate!!! Means a lot
please tell me how he make the data in multipleline 3:00
@@aniketsingh9390 Did u get ?
@@naveens7120 yes
The idea of using type is good it makes u have a better understanding of how things are working.
i also wrote some code
import json
data={
'name':'TCS',
'shares': 1024,
'prices': 244000
}
print(type(data))
#
json_str = json.dumps(data, indent=4)
print(json_str)
print(type(json_str))
#
Good work my friend !! You understand the concept very well !!
Hi I have question about OASIS TOSCA. Could you help me.
omg!!!!!!!11 SU PER GOOOOOOOOOOD
LOVED IT TOTALLY
Ps: you teach better than my professor
how we sort json key data alphabetically in python?
Hello, Thanks for the video to explaining the json handling for pythion, I have a question about when I got the file including few json content inside, how to separate the the file at end of each json (like at the end of the json of each line have a "}}"), and what I need to do if we only need to process the fist json content ?
same question here. Thanks too
Nice...Sensable topics ...Do you have any session on converting nested json to csv using pandas???
Great video! Do you have any videos/links on how to import json data into a postgres (pgadmin4) table using python? 😀
Can you share the flask tutorial link
Can you please share the link of the next video after this
Bhai maza aa gya cool video
Thanks my friend !! Share this video with your friends and do watch other videos on the channel !!
Excellent
Thank q so much for this explanation
U r best thanks yrr
Thanks man ! Your compliments mean way more than you can ever imagine. Do share the channel with your friends and hello it grow. 😊
the video is good - to add further how to load this file to server or excel in the readable format
why subtitles are not coming in this videos
One more thing can I use urllib.request to handle API calls instead of request?
Of course you can!!
When I try to print my json file I get a ‘u’ next to every key and value pair. Why is that happening? Please explain
The u- prefix just means that you have a Unicode string. When you really use the string, it won't appear in your data.
I can't find the video about python "requests" library you promised to post next.
yes I was looking for it as well :)
Thanks a lot good video good explanation
My pleasure
very well done , it will be helpful if you create full app with including all these JSON,request module with Flask maybe
Nice Idea !! Will work on it !!
when I print my json file I get error :
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\json\__init__.py", line 293, in load
return loads(fp.read(),
AttributeError: 'str' object has no attribute 'read'
how to fix it?
json.loads(function)
Good one. 👍
Thanks man !!
how to store real time data in json file format? ex : stock market data ?
You should look for something like Firebase realtime Database.
great work 👌👌
Thank you !!
which editor you are using sir for running programs.
Pycharm
nice tutorial..help full
Thanks mate !!
how you copy to one line please tell me ..........
mishra jii make a video on how to use pycharm effectively
when I type in the "json.load()" line, it gives me an error saying that "Extra data: line 2 column 1 (char 340)"
please tell me how he make the data in multipleline 3:00
im getting the same thing
@@TomTerrific121 Its because of the json data. There must be some error in the code
I
Json.loads() you are missing s
Anyone know which editor / compiler he’s using?
Pycharm
your videos are very informative can you show how to create data pipeline. Thank you
I am getting an error while reading json file, mentioned below:
JSONDecodeError: Extra data: line 2 column 1 (char 4144)
Please explain this
I would like to see your code for it. Either comment here or DM me on Instagram @pylenin
Thank you
Keep going brother
Thank you so much !
Plz explain separators()
I can't find the video on requests. Could you send me the link please? many thanks in advance
Hi.
Sorry but I never found time to make the video on requests. But now that so many people are texting about it, I will be sure to make one soon❤️❤️
Too good explanation . could you please do some videos on pyspark
Ofcourse. Also join me on my Instagram @pylenin. You can send me tutorial requests there as well.
Hi! I am unable to install jsonlib in anaconda platform . Its showing I need to have ms visual c++ 14.0 for the same Can you plz help?
I don't think you need to install json. Json library should come already installed
@@PyLenin Thanks for your prompt response Lenin but while I wrote import json it's having no probs but when I am trying to read a json file its saying there in no name called ....this file does not exist...also I need to read 300 json files to read at a go...plz help....completely naive me in ds :)0 so plz
@@krittwikakar7520 may be your python file and json does are not in the same folder. You need to mention the correct folder location for your json files.
good job brother
Thanks my friend !!
`json.dump...` doesn't need to be assigned to `data_serialized`. The `json.dump` function returns a `None`. The last line of your code, you can remove `data_serialized =` and the scripts would work the same.
Hi, I got this API link jsonplaceholder.typicode.com/todos and when I try to do it it comes up as a list and not as a dictionary.
Because all the data is within a list. See the data. It is covered by square brackets !!
Hello Lenin,
This video was really helpful, I am looking for requests video.
I couldn't find, Can you please assist me here?
Regards,
Ati jha2
Hi thnaks for the clearly.
sir how to contact you
How to read newlines in json ??
Please give an example to demonstrate.
@@PyLenin
character ....
Text : hey
how are you ?
I want to display how are you in next line
Thank you for the informative tutorial about handling JSON via API. I have a question about understanding "metadata". please follow this link for example I am providing: www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=5min&apikey=demo
In that link, first thing you will see are "metadata" with 6 different variables. In python, If I want to create column that specified 3 types. How is it possible? I am just curious because some JSON file does not have METADATA in it like in the link shown. Thanks!
Please explain how you convert single line into multiple line
I think I pressed Cmd + alt + L on Mac !!
What about linux
@@PyLenin I want to convert my json file to csv file please make video as soon as possible in this week if possible I desperately needed
please make tutorial on Django....framework tq sir
Sure mate
Please make video in request mudule
Next in line bro !!!