IniziaInizia gratis

Symbols vs. Strings

Using symbols to refer to columns can sometimes be easier than using strings. There is not much speed difference between them, so it is up to you what you want to use.

In this exercise, you'll be working with the penguins dataset containing data about different species of penguins. Scientists are interested in the island the penguin was observed at as well as some basic measurements of its body as the flipper length or the shape of its beak, represented by the columns culmen depth and culmen length. Body weight and sex is also recorded.

Let's select some columns so you can see what you like using the penguins dataset!

The DataFrames package and the penguins dataset have been loaded for you.

Questo esercizio fa parte del corso

Data Manipulation in Julia

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Select the species column using symbol
____[:, ____]
Modifica ed esegui il codice