Data types for data science

Intermediate Google Sheets

Richie Cotton

Data Evangelist at DataCamp

Calculating the mean, badly

An incorrect calculation of the mean of 5 numbers.

Intermediate Google Sheets

What went wrong?

A
1 49.53669111
2 7.42453201
3 63.47273292
4 28.37423I27
5 15.57589729
6 34.00246333
Intermediate Google Sheets

Please don't stare!

A photo of a woman staring at a laptop.

Intermediate Google Sheets

The 4 common data types

  • Numbers (123.456)
  • Text ("Hello!")
  • Dates (1900-02-29)
  • Logical (TRUE)
Intermediate Google Sheets

ISNUMBER() checks if a cell contains a number

A B C
1 Value Command Result
2 9.869604 =ISNUMBER(A2) TRUE
3 Data science is fun! =ISNUMBER(A3) FALSE
Intermediate Google Sheets

Other "IS" functions for checking types

  • ISTEXT() checks for text.
  • ISDATE() checks for dates and times.
  • ISLOGICAL() checks for TRUE and FALSE.
Intermediate Google Sheets

Checking cell properties and rarer types

  • ISURL() checks if text is web URL.
  • ISFORMULA() checks if the cell contains a formula.
Intermediate Google Sheets

Copying formulas between cells

An animation of copying formulas by dragging the bottom right corner of a cell.

Drag the bottom-right corner of the cell to copy. Alternatively,

  • to copy right, use CTRL + R (CMD + R on macOS).
  • to copy down, use CTRL + D (CMD + D on macOS).
Intermediate Google Sheets

Let's go!

Intermediate Google Sheets

Preparing Video For Download...