Tag: datacleaning

  • 9. How to clean data with Google Sheets functions (part 4): Split data

    #datacleaning #datapreparation #GoogleSheets

    How to split data from the following table with the GPS coordinates of the Colosseum in Rome, Italy to obtain latitude and longitude: insert SPLIT function in a new cell, A4 is the cell where the text is located, “-“ means that the text is divided based on minus sign.

  • 8. How to clean data with Google Sheets functions (part 1): Remove duplicates and COUNTIF functions

    #datacleaning #datapreparation #GoogleSheets

    Step 1: Remove any duplicates

    Select all columns, in the menu bar choose Data, then Data cleanup and select Remove duplicates.

    Click Data has header row andselect the columns where to remove duplicates i.e. column D for names

    Step 2: Clean up any data that does not make sense with COUNTIF function

    The COUNTIF function returns a conditional count across a range.

    Syntax

    COUNTIF(range, criterion)

    • range – The range that is tested against criterion.
    • criterion – The pattern or test to apply to range.

    i.e. COUNTIF(A2:A9, “Taxi”) to see how many Taxi entries are in the table rows A2:A9

  • 7. How to clean data with Google Sheets (part 2): delete extra spaces and change case in strings

    #datacleaning #datapreparation #GoogleSheets

    Further Cleaning data steps continued from the part 1 with the reference table available in https://docs.google.com/spreadsheets/d/1PkAbgXC7C1g2dKzCCpaHBcAyPw-s1z7iUxIEJ0cCYWQ/template/preview

    Step 3: Delete extra spaces in cells with string data

    Highlight the data in the spreadsheet, click on the Data tab, from Data cleanup select Trim whitespaces

    The following message explains that extra spaces were deleted in 4 cells:

    Step 4: Change case (upper and lower) text

    Google Sheets provides an Add-On for this task: click on the Add-ons option at the top of Google Sheets, click on Get add-ons and search for ChangeCase.

    To change the case, select the text to be edited, e.g. a column, click on the Add-Ons tab and select ChangeCase and select the option All lowercase or the needed option

    to obtain all lowercase in the selected column

    This step can be reverted with Clear formatting: click the Format tab and select the Clear Formatting option.

  • 6. How to clean data with Google Sheets: blank cells and transpose (part 1)

    #datacleaning #datapreparation #GoogleSheets

    Data cleaning includes several activities. This example is based on a hands-on activity of Google Data Analytics Professional issued by Coursera.

    Reference file is available here:

    https://docs.google.com/spreadsheets/d/1PkAbgXC7C1g2dKzCCpaHBcAyPw-s1z7iUxIEJ0cCYWQ/template/preview

    Step 1: Find blank cells

    Highlight all cells in the spreadsheet, click on Data e select Create a filter

    To review a list of all the rows with blank cells, in the Order date column Filter by condition (is empty) and click OK:

    After managing these cells, turn off this filter with Filter by condition (None).

    Step 2: Transpose

    Transposing=convert the data from long format (more rows than columns) to wide format (more columns than rows).

    Highlight and copy data to be transposed including column labels (e.g. columns A1-H45). Then select a new cell (J2) and Paste special with Transpose option.

    Delete the old table.

  • 1. Data cleaning (sorting and filtering) with Google Sheets

    1. Data cleaning (sorting and filtering) with Google Sheets

    Data cleaning based on a hands-on activity of Google Data Analytics Professional issued by Coursera

    Skills: #datacleaning #filtering #GoogleSheets

    Goal: understand how to improve the performance of students in a public school. Data source: reports and surveys of two public schools (named GP, MS). Information included in data: student grades, background information, study time, participation in extracurricular activities.

    Access to Google sheet file https://docs.google.com/spreadsheets/d/1lekmvxJDglmqUKxSxSk7TiA8Sfurqc9pTyKXIgUvNm4/template/preview?resourcekey=0-O8LBUyc6VTc9sYPH6hdsmw#gid=1019073941 to download and follow step by step

    Click on the top right corner (Use model) to get a working copy

    Rename the spreadsheet

    Before sorting, select all the data

    Sort from menu: Data->Sort Range->Advanced

    Then sort by school and by age

    To obtain

    Potential issue: scrolling through the data, you see that the age range of the students at GP school is 15-22 years, and the age range of the students at MS school is 15-20 years.

    Filtering to add a restraint: the age range should be 15-19 for both schools. Any student outside this age range should be deleted from the dataset: i.e. remove the ages 20, 21, and 22 from the dataset. To apply a filter to the age column, select the age column by clicking the letter at the top of the column.

    From the menu bar, select Data, then Create a filter

    Click on the filter icon (highlighted in yellow) to deselect 20, 21 and 22

    To obtain

    Turn off filter:  Data and Turn off filter

    Filling in missing data

    Student’s reason for choosing a specific school is important to know for this analysis: the reason column should be complete and without blanks. Apply a filter across the entire spreadsheet, clicking on any cell in the sheet. Then, from the menu bar, select Data and Create a filter.

    Click the Filter icon on the reason column (K). Filter this column for blanks by unchecking all the other values (course, home, reputation).

    Replace the missing values with the value, e.g. none_given. To do this while the column is still filtered for blanks, enter none_given in the first empty cell (K38). Then, press Enter. Immagine che contiene testo, schermata, Carattere, numero

Il contenuto generato dall'IA potrebbe non essere corretto.

    Double click the fill handle to fill all the other blank cells with the value none_given.

    Turn off filter