# Why does append!(df1, df2) return a DataFrame, as well as modify the argument df1?

**URL:** <https://discourse.julialang.org/t/why-does-append-df1-df2-return-a-dataframe-as-well-as-modify-the-argument-df1/122329>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [November 6, 2024, 11:03am UTC](https://discourse.julialang.org/t/why-does-append-df1-df2-return-a-dataframe-as-well-as-modify-the-argument-df1/122329 "2024-11-06T11:03:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![world-peace](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Post date:** [November 6, 2024, 12:15pm UTC](https://discourse.julialang.org/t/why-does-append-df1-df2-return-a-dataframe-as-well-as-modify-the-argument-df1/122329/3 "2024-11-06T12:15:25Z")

</div>

Functions usually either modify one of their arguments, or do not modify their arguments and return a new value.

Normally you would expect one of the two semantics:

```julia
isnothing(sort!(df1, df2))
# df1 modified, `nothing` returned

```

or

```julia
df3 = sort(df1, df2)
# neither df1, df2 modified, new value returned

```

This is not a Julia specific thing - it’s just sort of how most languages / APIs work.

---

_[View the full topic](https://discourse.julialang.org/t/why-does-append-df1-df2-return-a-dataframe-as-well-as-modify-the-argument-df1/122329)._
