# Covariance from DataFrame or TimeArray

**URL:** <https://discourse.julialang.org/t/covariance-from-dataframe-or-timearray/48375>\
**Category:** New to Julia\
**Tags:** statistics, dataframes, finance\
**Created:** [October 14, 2020, 4:24pm UTC](https://discourse.julialang.org/t/covariance-from-dataframe-or-timearray/48375 "2020-10-14T16:24:31Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![rvaj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rvaj/32/8048_2.png) [@rvaj](https://discourse.julialang.org/u/rvaj)\
**Post date:** [October 14, 2020, 7:16pm UTC](https://discourse.julialang.org/t/covariance-from-dataframe-or-timearray/48375/7 "2020-10-14T19:16:35Z")

</div>

Oh, yeah, that’s fine. I am packing my data in a TimeArray with 5719 rows and 7091 columns. Running cov(values(data)) on that answers in 4 seconds. The issue is that, to deal with missings, we must extract copies of the data from the underlying data structure and run cov(.) individually on the requisite elements. That is costly even for pandas, but my feeling is that the work is done on the underlying raw data using views rather than by copying, etc.

---

_[View the full topic](https://discourse.julialang.org/t/covariance-from-dataframe-or-timearray/48375)._
