Created
June 7, 2018 00:37
-
-
Save rayh/8a855bff835608f6f6229f7cfdb1415a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let myTable = MLDataTable(...) | |
// Fetch the price column (and all it's values) | |
let priceColumn = myTable["price"] | |
// Create a new column that contains values that are the result of | |
// price * bedroom for each row | |
let priceTimesBedroomsColumn = myTable["price"] * myTable["bedrooms"] | |
// Remove rows that contain less that 2 bedrooms | |
let filteredTable = myTable["bedrooms"] < 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment