BaşlayınÜcretsiz başlayın

Filtering DataFrames

The filter function is incredibly useful to quickly obtain a subset of data based on a certain condition. You can filter on vectors, tuples, DataFrames, and other data structures. However, in these exercises, we will focus on tuples and DataFrames.

The syntax for filter is:

filter(source => f::Function, df)

For a DataFrame: - source is the column to filter on - f::Function is our filter condition as an anonymous function - df is the DataFrame to filter on

Bu egzersiz, kursun bir parçasıdır

Intermediate Julia

Kursa Göz Atın

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Use an anonymous function to filter the tuple nums
nums = ____
filter(____, nums)
Kodu Düzenle ve Çalıştır