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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Min-Woong Sohn
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?

--
You received this message because you are subscribed to the Google Groups "julia-stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Cedric St-Jean-2
I think you're looking for:

eltype(df[:col_name]) <: AbstractFloat

and

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

On Friday, April 8, 2016 at 11:42:40 AM UTC-4, Min-Woong Sohn wrote:
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?

--
You received this message because you are subscribed to the Google Groups "julia-stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Min-Woong Sohn
These worked perfectly. Thank you!

On Friday, April 8, 2016 at 2:39:55 PM UTC-4, Cedric St-Jean wrote:
I think you're looking for:

eltype(df[:col_name]) <: AbstractFloat

and

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

On Friday, April 8, 2016 at 11:42:40 AM UTC-4, Min-Woong Sohn wrote:
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?

--
You received this message because you are subscribed to the Google Groups "julia-stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.