# Julia create and populate empty dataframe with unsigned number value

**URL:** <https://discourse.julialang.org/t/julia-create-and-populate-empty-dataframe-with-unsigned-number-value/24913>\
**Category:** New to Julia\
**Created:** [June 4, 2019, 10:04am UTC](https://discourse.julialang.org/t/julia-create-and-populate-empty-dataframe-with-unsigned-number-value/24913 "2019-06-04T10:04:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luigi\_Marongiu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luigi_marongiu/32/7909_2.png) [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Post date:** [June 4, 2019, 10:04am UTC](https://discourse.julialang.org/t/julia-create-and-populate-empty-dataframe-with-unsigned-number-value/24913/1 "2019-06-04T10:04:24Z")

</div>

Dear all,  
I am using Julia to populate an empty dataframe. I instantiated an empty dataframe with

```julia
df = DataFrame(
    Sample = String[],
    Match_len = UInt32[],
    Hit_len = UInt16[])

```

I then extract subsets of data from another dataframe of the same structure of `df` and populate with `append!(df, x)` where `x` is the subset. while the string format is maintained, the numbers are converted into hexadecimal, for instance:

```julia
julia> df
2×8 DataFrame. 
| Row | Sample | Match_len │ Read_len │ 
| | String | UInt32 | UInt16 |
| 1 | A4 | 0x005c8a11 | 0x001b |
| 2 | A5 | 0x005c8a11 | 0x001b |

```

If I print the `Match_len` field, I get:

```julia
julia> print(df[:Start])
UInt32[0x005c8a11, 0x005c8a11]

```

but this instead should give 6064657 and 6064658. These values are maintained if I create an empty dataframe with Int32/16. Since the numbers are non signed, is it possible to keep the original values (that is 6064657 uinstead of 0x005c8a11)?  
Thank you

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [June 4, 2019, 11:10am UTC](https://discourse.julialang.org/t/julia-create-and-populate-empty-dataframe-with-unsigned-number-value/24913/2 "2019-06-04T11:10:41Z")

</div>

> [@Luigi\_Marongiu](#):
>
> the numbers are converted into hexadecimal

Unsigned integers are **displayed** in base-16 (hex). This does not affect their value.

```julia
julia> 3735928559 == 0xdeadbeef
true

```
