Session 10 - File Handling + Serialization & Deserialization | DSMP 2022 - 23

preview_player
Показать описание
Session 10 - File Handling + Serialization & Deserialization | DSMP 2022 - 23
----------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------

⏲️ Timestamp
--------------------
0:00 Streaming Start
2:40 Info About New Website
3:45 Plan of Session and whole week
10:00 Session Start
11:55 Types of Data in Input Output
13:53 How File I/O is done in most programming languages
14:50 Writing to a file - TXT file. New file
19:22 Writing multiple lines
20:45 Writing to a file - TXT file. Existing file
22:45 How open() works?
24:42 Problems with 'w' mode. Append mode is solution'
26:55 Writing many lines
32:02 Saving files at any location
33:30 Reading from Files read()
36:20 Reading from Files readline()
39:00 Reading big file line by line
45:25 Using Context Manager (With)
50:10 reading 10 char at a time till end file
52:28 Reading big file in chunks
1:01:37 Seek and Tell
1:09:38 Problems with text file
1:12:31 Working with binary file
1:16:08 Working with other data types in file handling
1:23:11 Serialization and Deserialization
1:26:00 serialization using JSON module .dump()
1:28:52 Deserialization using JSON .load()
1:32:40 Serialization and Deserialization of tuple
1:34:41 Serialization and Deserialization of nested dict
1:36:25 Serialization and Deserialization of custom object
1:46:19 Pickling
1:52:52 Pickle vs JSON
1:54:00 Doubt Clearance
Рекомендации по теме
Комментарии
Автор

Sir aap views aur subscribers par maat jaana, please aise hi content bnate raho. You are the best in the world. Under your guidance I think I will become a good Data Scientist. Keep me in your light sir. I wish to grow such that I can call you as my first mentor at a very big stage.

ankitsaurabh_
Автор

Your videos are so underated. These videos are actually GOLDMINES !!

sarthakkaushik
Автор

When using the json.dump() or json.dumps() functions in Python, tuples are converted to lists in the resulting JSON output. This is because JSON does not have a built-in tuple data type.

JSON supports a limited set of data types, including strings, numbers, booleans, arrays (lists), and objects (dictionaries). Since tuples in Python are immutable and ordered sequences, they don't have a direct equivalent in JSON.

To represent the data from a tuple in JSON, it is converted to a list, which is the closest JSON equivalent to a tuple. This allows for preserving the order of elements and accessing them using numerical indices, just like in a tuple.

shweetamehta
Автор

Thank's Bhaiya ji mai Internship kar rha tha but due too sem exam I have to drop my session so I missed more topics but this file handling all topics totally matched by those mentor teach other student .So thank's bhaiya for more knowledge... I belongs a middle class family but this channel is more helpful for me and you are my elder brother.... One more request bhaiya ji Please make a playlist for Tableau please bhaiya

sparshsharma
Автор

awesome itana acche content mujhe to nahi mila kisi or you tube video me

DevendraKumar-chkw
Автор

21/140

At 40:46, alternate lines are getting printed because:
the first f.readline() just checks if the loop should continue and it does not prints anything. The second f.readline() is printing the next line. And it goes on. Therefore only alternate lines are getting printed

yatinshekhar
Автор

Sir, I rarely comment and like videos. But for the first time i felt commenting all your videos . Thankyou for sharing topics with depth 🙏

deepikaballa
Автор

Starting from small and simple examples to advance step by step, usage of simple variables and keywords and explaining each and every type in simplest way possible makes your videos a hidden gem. You have made this concept so easy to understand that I have shared your videos with my classmates. Thank you so much for your efforts.🙏😇

nikhil.moharir
Автор

57:52
with open("file.txt", 'r') as fin:
chunk_size = 100
while 1:
s = fin.read(chunk_size)
if not s:
break
print(s)

kom_senapati
Автор

treasure for data science aspirants. .. thank you, 🙏🙏 sir

hemujagwan
Автор

In 1:24:05 you said JSON full form is JavaScript On Notation but JSON stands for JavaScript Object Notation. Koee baat ni mistake insaan se hee hote ha . but waise he bta deya . Love from Pakistan.

qurashishebi
Автор

1:31:26 Nó way sir
mai yha tk áá gaya and didnt éven realise...Áap bést ho<<<333

flakky
Автор

Great content and explaination but there is a faulty code at 1:01:31 the correct code would be:
with open('big.txt', 'r') as f:
chunk_size = 10
while True:
reading = f.read(chunk_size)
if len(reading) > 0:
print(reading, end='***')
else:
break

prashantmaurya
Автор

Very interesting and great explanation sir

sujithsaikalakonda
Автор

1:24:53 Isnt serialisation is process of converting objects into byte stream which will be stored in binary files!!!!

kom_senapati
Автор

#Just a better code to read multiple lines without the if condition
for i in f.readlines():
print(i, end='')

yashshrivastava
Автор

Sir please add project video on website

AnujKumar-pvci
Автор

Hello sir...what if object is inherited from other class so in that case if we pickled that file in a binary format and sent it to another system. Will that system now be able to access that object since some of its functionality is dependent upon the parent class?

ashisharora
Автор

can I enroll now to see the paid session?

amrinakter
Автор

At 43:00, what if you are having an empty line then there is a content. It will break the code. Do you have something which is a generic approach to avoid such issues.

RupeshSingh