Raw Files
This lesson focuses on raw files. It gives a complete explanation about how to read data from raw files using Python.
We'll cover the following
Introduction to raw files #
Sometimes you get data in strange formats and you have to roll your own Python code to process the data. Fortunately, doing this is simple.
For this, we will assume that you have data in some type of text file. Each row of data corresponds to a row in your text file.
For example, you might have a file delimited by a pipe (|). It could look something like this:
James|22|M
Sarah|31|F
Mindy|25|F
Above we have 3 rows of data each with 3 values separated by a pipe (|) - name, age, and gender.
We can create this same file in Python to process using tempfile.
Get hands-on with 1400+ tech skills courses.