Editing DS4UX (Spring 2016)/Reading and writing files
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
One of the most common operations you will perform when you use Python for data analysis will be reading and writing data to and from flat files | One of the most common operations you will perform when you use Python for data analysis will be reading and writing data to and from flat files (also referred to as [[w:Flat_file_database|flat file databases]]—not because the files themselves are special, but because they hold multiple pieces of data in a structured format that facilitates common data processing operations like querying, overwriting, appending, and ingesting. | ||
Probably to most basic type of "flat file database" is a plain text file with a different piece of data on each line. To process a file like this in Python, you generally follow these steps: | Probably to most basic type of "flat file database" is a plain text file with a different piece of data on each line. To process a file like this in Python, you generally follow these steps: |