DataFrames.jl (3) and Pipe

Selecting and transforming columns When selecting variables of a data frame, we do add : to indicate that it’s a variable name. Thus for example, if we want to select column with variable x, we use :x inside select(). First let’s construct some 500 by 3 dimensional data frame called df that contains three columns each of which has name of A, B, and C. using DataFrames df = DataFrame( A=1:2:1000, B= repeat(1:10, inner=50), C= 1:500) Each of below codes produces 500 by 1 dataframe, a data frame that only contains column A....

April 19, 2023 · 2 min · 313 words · Me