# \#dataframes

**URL:** https://discourse.julialang.org/tag/dataframes/192.md?page=3

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 4

---

## [Vector to Matrix. How to do it generally](https://discourse.julialang.org/t/vector-to-matrix-how-to-do-it-generally/118579)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 2\
**Last updated:** [August 25, 2024, 9:25am UTC](https://discourse.julialang.org/t/vector-to-matrix-how-to-do-it-generally/118579 "2024-08-25T09:25:56Z")

</div>

I have a DataFrame, and I am creating a function that receives it, extracts a few columns and convert those columns into a matrix. I was using Matrix{T}(df) and it worked, but when the slected columns turn to be 1, it sa…

---

## [Rationale for dropmissing vs skipmissing](https://discourse.julialang.org/t/rationale-for-dropmissing-vs-skipmissing/118560)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 2\
**Last updated:** [August 24, 2024, 6:52pm UTC](https://discourse.julialang.org/t/rationale-for-dropmissing-vs-skipmissing/118560 "2024-08-24T18:52:55Z")

</div>

As outlined in How to remove rows containing missing from DataFrame? the way to get rid of missings in a DataFrame is to use dropmissing. This works really well and I use it all the time, but it bugs me that I cannot use…

---

## [Read DataFrame from Excel file skipping one line with units and "cleaning-up" column names](https://discourse.julialang.org/t/read-dataframe-from-excel-file-skipping-one-line-with-units-and-cleaning-up-column-names/114528)

<div class="topic-metadata">

**Author:** [@mjmat](https://discourse.julialang.org/u/mjmat)\
**Replies:** 11\
**Last updated:** [August 24, 2024, 6:14pm UTC](https://discourse.julialang.org/t/read-dataframe-from-excel-file-skipping-one-line-with-units-and-cleaning-up-column-names/114528 "2024-08-24T18:14:23Z")

</div>

I suspect this has been asked before, but I can’t seem to find an answer to this (apparently) simple problem. Let’s assume I have an Excel file with m columns, and the following rows: 1st row: variable names 2nd row: …

---

## [Performance vs notation tradeoff: DataFrame vs AxisArray vs StaticArray vs?](https://discourse.julialang.org/t/performance-vs-notation-tradeoff-dataframe-vs-axisarray-vs-staticarray-vs/118323)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 2\
**Last updated:** [August 20, 2024, 4:47pm UTC](https://discourse.julialang.org/t/performance-vs-notation-tradeoff-dataframe-vs-axisarray-vs-staticarray-vs/118323 "2024-08-20T16:47:33Z")

</div>

I’ve got two datasets that would look like this in a dataframe (see later for MWE): julia\> df1 = mat2df(mat1, colnames1, id1) 8×5 DataFrame Row │ id col1 col2 col3 col4 │ String Int64 Int64 Int64 …

---

## [Julia performance on the same task on different CPUs and OSs](https://discourse.julialang.org/t/julia-performance-on-the-same-task-on-different-cpus-and-oss/117916)

<div class="topic-metadata">

**Author:** [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Replies:** 8\
**Last updated:** [August 18, 2024, 4:57am UTC](https://discourse.julialang.org/t/julia-performance-on-the-same-task-on-different-cpus-and-oss/117916 "2024-08-18T04:57:22Z")

</div>

The workload Arrow files with 250K individuals and 3M education status observations Read into memory as DataFrames, join individual records with education status observations. Group resulting data frame by individual a…

---

## [Balancing groups in DataFrame](https://discourse.julialang.org/t/balancing-groups-in-dataframe/118284)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 5\
**Last updated:** [August 17, 2024, 6:16pm UTC](https://discourse.julialang.org/t/balancing-groups-in-dataframe/118284 "2024-08-17T18:16:32Z")

</div>

Quick question: suppose I have a DataFrame of the form df = DataFrame(grouping1 = \[1, 1, 2, 2\], grouping2 = \[true, true, true, false\]) Even though, for the grouping1 category: 1, there are no observations with groupi…

---

## [Compare data from two dataframes](https://discourse.julialang.org/t/compare-data-from-two-dataframes/118254)

<div class="topic-metadata">

**Author:** [@Sandy45](https://discourse.julialang.org/u/Sandy45)\
**Replies:** 3\
**Last updated:** [August 17, 2024, 1:57pm UTC](https://discourse.julialang.org/t/compare-data-from-two-dataframes/118254 "2024-08-17T13:57:45Z")

</div>

I have two dataframes as shown below and I need to create csv file or json output like shown below. I need to get dominant row for each product for each date from two dataframes then compare them to generate below outpu…

---

## [Fastest way to read fixed-width tables embedded in a larger text file](https://discourse.julialang.org/t/fastest-way-to-read-fixed-width-tables-embedded-in-a-larger-text-file/118108)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 9\
**Last updated:** [August 14, 2024, 11:11pm UTC](https://discourse.julialang.org/t/fastest-way-to-read-fixed-width-tables-embedded-in-a-larger-text-file/118108 "2024-08-14T23:11:36Z")

</div>

I’ve got a bunch of .txt files that contain a few hundred lines of “junk” at the beginning, then two tables embedded at the end. Those two tables always begin the same number of lines from the end of the file. Further, t…

---

## [Parallelization for Large DataFrames](https://discourse.julialang.org/t/parallelization-for-large-dataframes/117807)

<div class="topic-metadata">

**Author:** [@ujjwal\_singh](https://discourse.julialang.org/u/ujjwal_singh)\
**Replies:** 2\
**Last updated:** [August 4, 2024, 1:42pm UTC](https://discourse.julialang.org/t/parallelization-for-large-dataframes/117807 "2024-08-04T13:42:44Z")

</div>

@bkamins, would you please suggest how to make the attached code more efficient with parallelization? The DataFrame size is 1,877,655,217 rows × 27 columns. using DataFrames, Dates, Statistics, Base.Threads # Optimized…

---

## [Dataframes subset w/ nullable logic](https://discourse.julialang.org/t/dataframes-subset-w-nullable-logic/117484)

<div class="topic-metadata">

**Author:** [@mikemartind](https://discourse.julialang.org/u/mikemartind)\
**Replies:** 4\
**Last updated:** [July 25, 2024, 9:07pm UTC](https://discourse.julialang.org/t/dataframes-subset-w-nullable-logic/117484 "2024-07-25T21:07:36Z")

</div>

Working on a subset call that filters on multiple columns in a dataframe, but with variable conditions set by an external dict. So if the dict has a value, it checks for equality in the corresponding column. If the dict …

---

## [What is the recommended way to filter rows of a Dataframe?](https://discourse.julialang.org/t/what-is-the-recommended-way-to-filter-rows-of-a-dataframe/117367)

<div class="topic-metadata">

**Author:** [@curious](https://discourse.julialang.org/u/curious)\
**Replies:** 6\
**Last updated:** [July 23, 2024, 1:15pm UTC](https://discourse.julialang.org/t/what-is-the-recommended-way-to-filter-rows-of-a-dataframe/117367 "2024-07-23T13:15:48Z")

</div>

Hello, I am asking for recommendations/tips on how to filter rows of a dataframe. I was using filter for sometime. But it seems inefficient/slow compared to subsetting dataframe using other methods. Here are benchmarks …

---

## [Filtering dataframe for unique rows with respect one of column](https://discourse.julialang.org/t/filtering-dataframe-for-unique-rows-with-respect-one-of-column/117185)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [July 18, 2024, 1:50pm UTC](https://discourse.julialang.org/t/filtering-dataframe-for-unique-rows-with-respect-one-of-column/117185 "2024-07-18T13:50:30Z")

</div>

Hello i have following DataFrame : julia\> a = DataFrame(x = \[1, 2, 2, 3, 4\], b = \[3, 4, 5, 6, 7\]) 5×2 DataFrame Row │ x b │ Int64 Int64 ─────┼────────────── 1 │ 1 3 2 │ 2 4 3…

---

## [SharedArray using DataFrames()](https://discourse.julialang.org/t/sharedarray-using-dataframes/116908)

<div class="topic-metadata">

**Author:** [@Gast](https://discourse.julialang.org/u/Gast)\
**Replies:** 0\
**Last updated:** [July 11, 2024, 12:54pm UTC](https://discourse.julialang.org/t/sharedarray-using-dataframes/116908 "2024-07-11T12:54:07Z")

</div>

Hi all I use the DataFrame.jl package to define and manipulate arrays across several nested functions. I plan to parallelize some of the tasks (e.g., for loops with data allocations) by using the Distributed.jl package…

---

## [How to supplement a function for equality check when joining the DataFrames](https://discourse.julialang.org/t/how-to-supplement-a-function-for-equality-check-when-joining-the-dataframes/116666)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 2\
**Last updated:** [July 5, 2024, 5:33pm UTC](https://discourse.julialang.org/t/how-to-supplement-a-function-for-equality-check-when-joining-the-dataframes/116666 "2024-07-05T17:33:28Z")

</div>

I have two DataFrames, which both contain the same key, but with different accuracies: I load two datasets, which contain the physical properties of some physical objects. The first dataset contains one subset of the pro…

---

## [Agent based model - create scatter plot with agent variables from data frame](https://discourse.julialang.org/t/agent-based-model-create-scatter-plot-with-agent-variables-from-data-frame/115553)

<div class="topic-metadata">

**Author:** [@tfranks](https://discourse.julialang.org/u/tfranks)\
**Replies:** 1\
**Last updated:** [June 15, 2024, 3:37am UTC](https://discourse.julialang.org/t/agent-based-model-create-scatter-plot-with-agent-variables-from-data-frame/115553 "2024-06-15T03:37:14Z")

</div>

Hello, I’ve created an agent-based model where a Bank agent has randomly assigned variables of “uninsured,” "investments,"and “AFS\_securities” that are collected in a data frame after running. I now want to create a 3D…

---

## [Copy/paste a DataFrame into a PowerPoint table](https://discourse.julialang.org/t/copy-paste-a-dataframe-into-a-powerpoint-table/115570)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 4\
**Last updated:** [June 13, 2024, 8:09am UTC](https://discourse.julialang.org/t/copy-paste-a-dataframe-into-a-powerpoint-table/115570 "2024-06-13T08:09:20Z")

</div>

I’m looking if anyone in the community have already come with a quick/simple way to just “copy paste” a DataFrame, whose columns are all composed of real numbers, into a PowerPoint table. Would save me tons of time!!! Ex…

---

## [How to use @byrow inside @chain pipeline?](https://discourse.julialang.org/t/how-to-use-byrow-inside-chain-pipeline/115184)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 2\
**Last updated:** [June 4, 2024, 5:36pm UTC](https://discourse.julialang.org/t/how-to-use-byrow-inside-chain-pipeline/115184 "2024-06-04T17:36:01Z")

</div>

I am trying to organize a pipeline for data processing using the @chain macro. However, I have a problem with using @byrow macro inside this pipeline. I get an error saying that @byrow is deprecated outside of DataFrames…

---

## [Combine function not naming column as cols =\> function =\> target\_cols implies](https://discourse.julialang.org/t/combine-function-not-naming-column-as-cols-function-target-cols-implies/114831)

<div class="topic-metadata">

**Author:** [@rhoxx](https://discourse.julialang.org/u/rhoxx)\
**Replies:** 7\
**Last updated:** [May 28, 2024, 3:50pm UTC](https://discourse.julialang.org/t/combine-function-not-naming-column-as-cols-function-target-cols-implies/114831 "2024-05-28T15:50:32Z")

</div>

Hi there I’m still new to Julia. Trying to figure out why some behavior is not as I would it expect to be. In the dataframes example for the split-apply-combine strategy here https://dataframes.juliadata.org/stable/man/…

---

## [Android studio, tflite and random forest](https://discourse.julialang.org/t/android-studio-tflite-and-random-forest/114839)

<div class="topic-metadata">

**Author:** [@Rahmat](https://discourse.julialang.org/u/Rahmat)\
**Replies:** 1\
**Last updated:** [May 28, 2024, 2:59pm UTC](https://discourse.julialang.org/t/android-studio-tflite-and-random-forest/114839 "2024-05-28T14:59:15Z")

</div>

how to connect tflite to android studio using machine learning random forest and using csv or excell data

---

## [DataFrame transformation is so slow, what am I doing wrong?](https://discourse.julialang.org/t/dataframe-transformation-is-so-slow-what-am-i-doing-wrong/114430)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 17\
**Last updated:** [May 19, 2024, 2:41pm UTC](https://discourse.julialang.org/t/dataframe-transformation-is-so-slow-what-am-i-doing-wrong/114430 "2024-05-19T14:41:29Z")

</div>

I want to do a transformation which may depends on a large number of columns. The MWE & benchmark codes: using DataFrames df = DataFrame(rand(10, 50), :auto) cols = propertynames(df) # due to the design of my actual c…

---

## [Unsure how to solve error message when applying unstack to DataFrame](https://discourse.julialang.org/t/unsure-how-to-solve-error-message-when-applying-unstack-to-dataframe/114214)

<div class="topic-metadata">

**Author:** [@Lee\_Phillips](https://discourse.julialang.org/u/Lee_Phillips)\
**Replies:** 6\
**Last updated:** [May 14, 2024, 10:33pm UTC](https://discourse.julialang.org/t/unsure-how-to-solve-error-message-when-applying-unstack-to-dataframe/114214 "2024-05-14T22:33:37Z")

</div>

Hello All I have a dataframe, the first 5 rows are shown below 5×4 DataFrame Row │ PointAID\_FK PointBID\_FK Distance Time │ Any Any Float64 Float64 ─────┼────────────────────────────────────…

---

## [Fastest way to save a large number of DataFrames to disk](https://discourse.julialang.org/t/fastest-way-to-save-a-large-number-of-dataframes-to-disk/114005)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 2\
**Last updated:** [May 10, 2024, 12:07pm UTC](https://discourse.julialang.org/t/fastest-way-to-save-a-large-number-of-dataframes-to-disk/114005 "2024-05-10T12:07:51Z")

</div>

I have a large number of dataframes generated from other sources like using DataFrames N = 1000 df\_dict = Dict(1:N .=\> \[DataFrame(rand(rand(1000:2000), 146), :auto) for \_ in 1:N\]) I’d like to save them into a single fi…

---

## [\`explode\`-like function in DataFrames](https://discourse.julialang.org/t/explode-like-function-in-dataframes/114113)

<div class="topic-metadata">

**Author:** [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Replies:** 3\
**Last updated:** [May 10, 2024, 3:31pm UTC](https://discourse.julialang.org/t/explode-like-function-in-dataframes/114113 "2024-05-10T15:31:44Z")

</div>

If I have a DataFrame in which one of the columns has Vectors of one of more elements, how do I make each value to be a different row with the rest of the data copied? Ex.: A | B \[1, 17, 9\] | "abc" \[2, 5\] …

---

## [DataFrames :auto argument no longer seems to work](https://discourse.julialang.org/t/dataframes-auto-argument-no-longer-seems-to-work/113920)

<div class="topic-metadata">

**Author:** [@alan](https://discourse.julialang.org/u/alan)\
**Replies:** 7\
**Last updated:** [May 9, 2024, 3:00pm UTC](https://discourse.julialang.org/t/dataframes-auto-argument-no-longer-seems-to-work/113920 "2024-05-09T15:00:25Z")

</div>

Has :auto been removed as an argument to DataFrame? It no longer seems to work: \> DataFrame(\[1 2; 3 4\], :auto) ERROR: MethodError: no method matching DataFrame(::Matrix{Int64}, ::Symbol) Closest candidates are: DataF…

---

## [Database backed for DataFrames](https://discourse.julialang.org/t/database-backed-for-dataframes/94768)

<div class="topic-metadata">

**Author:** [@ayushpatnaikgit](https://discourse.julialang.org/u/ayushpatnaikgit)\
**Replies:** 6\
**Last updated:** [May 4, 2024, 3:05am UTC](https://discourse.julialang.org/t/database-backed-for-dataframes/94768 "2024-05-04T03:05:54Z")

</div>

Any package in Julia like R’s dbplyr? dbplyr allows you to use remote database tables as if they are in-memory data frames by automatically converting dplyr code into SQL. I want to do the same with DataFrames and SQL.

---

## [Subtracting mean from DataFrame column: Why so many allocations?](https://discourse.julialang.org/t/subtracting-mean-from-dataframe-column-why-so-many-allocations/113607)

<div class="topic-metadata">

**Author:** [@JWMeer](https://discourse.julialang.org/u/JWMeer)\
**Replies:** 5\
**Last updated:** [April 29, 2024, 3:09pm UTC](https://discourse.julialang.org/t/subtracting-mean-from-dataframe-column-why-so-many-allocations/113607 "2024-04-29T15:09:57Z")

</div>

Consider the following DataFrame: df = DataFrame() df.a = repeat(1:1000, outer = 1000) df.b = rand(1000 \* 1000) This DataFrame consists of 1000 groups (grouped by a) of 1000 values each (stored in b). For each group, I…

---

## [DataFrames: obtaining the subset of rows by a set of values](https://discourse.julialang.org/t/dataframes-obtaining-the-subset-of-rows-by-a-set-of-values/15923)

<div class="topic-metadata">

**Author:** [@Luis\_de\_Sousa](https://discourse.julialang.org/u/Luis_de_Sousa)\
**Replies:** 45\
**Last updated:** [April 27, 2024, 9:32pm UTC](https://discourse.julialang.org/t/dataframes-obtaining-the-subset-of-rows-by-a-set-of-values/15923 "2024-04-27T21:32:33Z")

</div>

Hi everyone, I would like to perform an operation similar to the SQL SELECT \* FROM table WHERE col IN ("1","2","3") on a DataFrame. I have an array with a few strings that I wish to use in this selection. From what I ha…

---

## [Create grouped dataframe by properties of a given column?](https://discourse.julialang.org/t/create-grouped-dataframe-by-properties-of-a-given-column/113360)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 9\
**Last updated:** [April 26, 2024, 3:26pm UTC](https://discourse.julialang.org/t/create-grouped-dataframe-by-properties-of-a-given-column/113360 "2024-04-26T15:26:38Z")

</div>

Hi just wondering if there a way to group a DataFrame by properties within a column. E.g. Suppose julia\> df = DataFrame(date = Date(2024,3,25): Day(1):Date(2024,4,5)) 12×1 DataFrame Row │ date │ Date …

---

## [Dataframes: displaying categorical key when displaying a dataframe while saving the value in the data array](https://discourse.julialang.org/t/dataframes-displaying-categorical-key-when-displaying-a-dataframe-while-saving-the-value-in-the-data-array/113470)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 13\
**Last updated:** [April 25, 2024, 9:07pm UTC](https://discourse.julialang.org/t/dataframes-displaying-categorical-key-when-displaying-a-dataframe-while-saving-the-value-in-the-data-array/113470 "2024-04-25T21:07:53Z")

</div>

I have a question about displaying categorical data in a dataframe. I want to see if there is a way to display the categorical key value, while preserving the categorical value in the data. The point is to help users wo…

---

## [Combine multiple Arrays into one large dataframe matrix:](https://discourse.julialang.org/t/combine-multiple-arrays-into-one-large-dataframe-matrix/113411)

<div class="topic-metadata">

**Author:** [@GeodeticR](https://discourse.julialang.org/u/GeodeticR)\
**Replies:** 3\
**Last updated:** [April 24, 2024, 7:20pm UTC](https://discourse.julialang.org/t/combine-multiple-arrays-into-one-large-dataframe-matrix/113411 "2024-04-24T19:20:25Z")

</div>

I’ve attempted multiple ways to populate the “missing” values of my DataFrame with the appropriate values, I created the shell of a DataFrame that looks like this: ResVert\_matrix 1826×372 DataFrame Row │ decyr AGM…

[Previous page](https://discourse.julialang.org/tag/dataframes/192.md?match_all_tags=true&page=2&tags%5B%5D=dataframes)

[Next page](https://discourse.julialang.org/tag/dataframes/192.md?match_all_tags=true&page=4&tags%5B%5D=dataframes)
