DataFrame function to determine if an eltype is a floating point number

40 views
Skip to first unread message

Min-Woong Sohn

unread,
Apr 8, 2016, 11:42:40 AM4/8/16
to julia-stats
Is there a function that I can use if a column in a DataFrame (determined by eltype) is a floating point number or an integer? Another question is what is the best way to determine the maximum length of a string column?

Cedric St-Jean

unread,
Apr 8, 2016, 2:39:55 PM4/8/16
to julia-stats
I think you're looking for:

eltype(df[:col_name]) <: AbstractFloat

and

maximum(map(length, df[:col_name]))

Min-Woong Sohn

unread,
Apr 9, 2016, 12:32:52 AM4/9/16
to julia-stats
These worked perfectly. Thank you!
Reply all
Reply to author
Forward
0 new messages