Continuous data
My broad definition of continuous data is data that is stored as a number, either an integer or a float. There is some gray area between categorical and continuous data. For example, the grade level could be represented as a number (ignoring Kindergarten, or using 0 to represent it). A grade column, in this case, could be both categorical and continuous, so the techniques in this section and the previous section could both apply to it.
We will examine a continuous column from the fuel economy dataset in this section. The city08
column lists the miles per gallon that are expected when driving a car at the lower speeds found in a city.
How to do it…
- Pick out the columns that are numeric (typically
int64
orfloat64
):>>> fueleco.select_dtypes("number") barrels08 barrelsA08 ... phevHwy phevComb 0 15.695714 0.0 ... 0 0 1 29.964545 0.0 ... 0 0 2 ...