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
// Guardamos las columnas que vamos a combinar | |
let latitudColumn = frame2021["LATITUD"] | |
let longitudColumn = frame2021["LONGITUD"] | |
// Unimos las dos columnas en una nueva | |
frame2021.combineColumns("LATITUD", "LONGITUD", into: "LOCATION") { (latitud: Double?, longitud: Double?) -> CLLocation? in | |
guard let latitud = latitud, let longitud = longitud else | |
{ | |
return nil | |
} | |
return CLLocation(latitude: latitud, longitude: longitud) | |
} | |
// Volvemos a añadir las columnas que hemos unido | |
frame2021.append(column: latitudColumn) | |
frame2021.append(column: longitudColumn) | |
show(dataframe: frame2021) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment