# NaN Data Frame with labels and indexes

**URL:** https://discourse.julialang.org/t/nan-data-frame-with-labels-and-indexes/67588
**Category:** General Usage
**Tags:** dataframes
**Created:** [September 2, 2021, 3:56pm UTC](https://discourse.julialang.org/t/nan-data-frame-with-labels-and-indexes/67588 "2021-09-02T15:56:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jdbeck66](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdbeck66/32/19399_2.png) [@Jdbeck66](https://discourse.julialang.org/u/Jdbeck66)
#### Post date: [September 2, 2021, 3:56pm UTC](https://discourse.julialang.org/t/nan-data-frame-with-labels-and-indexes/67588/1 "2021-09-02T15:56:18Z")

</div>

I’m trying to make a data frame of NaN with set labels and indexes. I can’t find in the documentation how to do this.

Here is what I would do in Pandas:

```julia
label = ["1T", "1G", "1C", "2T", "2G", "2A"]
rescue_left = pd.DataFrame(columns=label,index=label)

```

And I’d get something that looks like this:

![Screen Shot 2021-09-02 at 9.54.38 AM](https://global.discourse-cdn.com/julialang/original/3X/4/a/4a9e278782b9719bf5f972c8cd32765eb60c48a4.png)

I was thinking I could make the matrix and then set the column labels as a vector, but I’m not sure how to set the row indexes.

Thanks for any help.

Jim

---

<div class="post-metadata">

### Author: ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)
#### Post date: [September 2, 2021, 4:13pm UTC](https://discourse.julialang.org/t/nan-data-frame-with-labels-and-indexes/67588/2 "2021-09-02T16:13:58Z")

</div>

Use [Pandas.jl](https://github.com/JuliaPy/Pandas.jl) to achieve what you want.

[DataFrames.jl](https://github.com/JuliaData/DataFrames.jl) similarly to several other popular ecosystems providing a data frame implementation does not support row indexes. You need to create a column for storing row indexes explicitly.

Additionally maybe [NamedArrays.jl](https://github.com/davidavdav/NamedArrays.jl) or [AxisArrays.jl](https://github.com/JuliaArrays/AxisArrays.jl) is something that you are looking for?

---

<div class="post-metadata">

### Author: ![Jdbeck66](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdbeck66/32/19399_2.png) [@Jdbeck66](https://discourse.julialang.org/u/Jdbeck66)
#### Post date: [September 2, 2021, 4:15pm UTC](https://discourse.julialang.org/t/nan-data-frame-with-labels-and-indexes/67588/3 "2021-09-02T16:15:31Z")

</div>

OK,

Thank you for the quick response. I’ll check out those packages.

Jim
