-
Book Overview & Buying
-
Table Of Contents
Hands-On Artificial Intelligence for IoT - Second Edition
By :
The comma-separated value (CSV) files are the most popular formats for storing tabular data generated by IoT systems. In a .csv file, the values of the records are stored in plain-text rows, with each row containing the values of the fields separated by a separator. The separator is a comma by default but can be configured to be any other character. In this section, we will learn how to use data from CSV files with Python’s csv, numpy, and pandas modules. We will use the household_power_consumption data file. The file can be downloaded from the following GitHub link: https://github.com/ahanse/machlearning/blob/master/household_power_consumption.csv, which we will do now:
!wget https://raw.githubusercontent.com/ahanse/machlearning/master/household_power_consumption.csv
To access the data files, we will define the following variables:
data_file = 'household_power_consumption.csv'
Generally, to quickly read data from CSV files, we use the Python CSV...