- Data Wrangling with Python
- Dr. Tirthajyoti Sarkar Shubhadeep Roychowdhury
- 228字
- 2021-06-11 13:40:25
Introduction
We were introduced to the basic concepts of different fundamental data structures in the last chapter. We learned about the list, set, dict, tuple, and string. They are the building blocks of future chapters and are essential for data science.
However, what we have covered so far were only basic operations on them. They have much more to offer once you learn how to utilize them effectively. In this chapter, we will venture further into the land of data structures. We will learn about advanced operations and manipulations and use these fundamental data structures to represent more complex and higher-level data structures; this is often handy while wrangling data in real life.
In real life, we deal with data that comes from different sources and generally read data from a file or a database. We will be introduced to operations related to files. We will see how to open a file and how many ways there are to do it, how to read data from it, how to write data to it, and how to safely close it once we are done. The last part, which many people tend to ignore, is super important. We often run into very strange and hard-to-track-down bugs in a real-world system just because a process opened a file and did not close it properly. Without further ado, let's begin our journey.