Operate on columns
These examples use .
Find and count the number of unique values in a specified column. The following examples find and count unique locations where data was collected.
- Uses keep() and to return unique values in the specified column.
Example results
Count unique values
This query:
- Uses group() to ungroup data and return results in a single table.
- Uses , unique(), and then to count the number of unique values.
Example results
To recalculate the column, use the with
operator in to overwrite the existing column.
- Uses filter() to filter the
average_temperature
measurement. - Uses to convert Fahrenheit temperature values into Celsius.
To use values in a row to calculate and add a new column, use . This example below converts temperature from Fahrenheit to Celsius and maps the Celsius value to a new celsius
column.
The following query:
- Uses map() to create a new column calculated from existing values in each row.