# Dataframe : Length of column

**URL:** <https://discourse.julialang.org/t/dataframe-length-of-column/19664>\
**Category:** General Usage\
**Created:** [January 15, 2019, 3:36pm UTC](https://discourse.julialang.org/t/dataframe-length-of-column/19664 "2019-01-15T15:36:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![RobLW](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roblw/32/6776_2.png) [@RobLW](https://discourse.julialang.org/u/RobLW)\
**Post date:** [January 15, 2019, 3:49pm UTC](https://discourse.julialang.org/t/dataframe-length-of-column/19664/2 "2019-01-15T15:49:36Z")

</div>

Ah sorry. I just figured out the solution thanks to this great post

> [DataFrames.jl - Vectorized row-wise function application](https://discourse.julialang.org/t/dataframes-jl-vectorized-row-wise-function-application/14513)

I ended up creating a function as

```julia
f(a) = length(a)

```

Then calling it on the new column

```julia
df[:ColName] = f.(df.Column3)

```

Not sure if this is the best way. Would appreciate to know if there are other ways.  
Thanks

---

_[View the full topic](https://discourse.julialang.org/t/dataframe-length-of-column/19664)._
