# Series.append

danfo.Series.**append**(newValue, index, options)

| Parameters | Type          | Description                                                                                                                | Default |
| ---------- | ------------- | -------------------------------------------------------------------------------------------------------------------------- | ------- |
| newValue   | Array, Series | Object to append                                                                                                           |         |
| index      | Array         | The new index value(s) to append to the Series. Must contain the same number of values as `newValues` as they map `1 - 1`. |         |
| options    | Object        | <p>{<br><strong>inplace</strong>: Whether to perform operation in-place or not.</p><p>}</p>                                | false   |

### **Append new Series to the end of a Series**

{% tabs %}
{% tab title="Node" %}

```javascript
const dfd = require("danfojs-node")

let sf1 = new dfd.Series([1, 2, 3, 4], { index: ['f1', 'f2', 'f3', 'f4'] })
let sf2 = new dfd.Series(["a", "b", "c"])

new_sf = sf1.append(sf2, ["f5", "f6", "f7"])
new_sf.print()
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Output" %}

```
╔════╤═══╗
║ f1 │ 1 ║
╟────┼───╢
║ f2 │ 2 ║
╟────┼───╢
║ f3 │ 3 ║
╟────┼───╢
║ f4 │ 4 ║
╟────┼───╢
║ f5 │ a ║
╟────┼───╢
║ f6 │ b ║
╟────┼───╢
║ f7 │ c ║
╚════╧═══╝
```

{% endtab %}
{% endtabs %}

### **Append new Series to the end of a Series in-place**

{% tabs %}
{% tab title="Node" %}

```javascript
const dfd = require("danfojs-node")

let sf1 = new dfd.Series([1, 2, 3, 4], { index: ['f1', 'f2', 'f3', 'f4'] })
let sf2 = new dfd.Series(["a", "b", "c"])
let newIndex = ["f5", "f6", "f7"]

sf1.append(sf2, newIndex, { inplace: true })
sf1.print()
```

{% endtab %}
{% endtabs %}

```
╔════╤═══╗
║ f1 │ 1 ║
╟────┼───╢
║ f2 │ 2 ║
╟────┼───╢
║ f3 │ 3 ║
╟────┼───╢
║ f4 │ 4 ║
╟────┼───╢
║ f5 │ a ║
╟────┼───╢
║ f6 │ b ║
╟────┼───╢
║ f7 │ c ║
╚════╧═══╝
```

### **Append an array to the end of Series**

{% tabs %}
{% tab title="Node" %}

```javascript
let sf1 = new dfd.Series([1, 2, 3, 4], { index: ['f1', 'f2', 'f3', 'f4'] })
let sfArr = ["a", "b", "c"]

new_sf = sf1.append(sfArr, ["f5", "f6", "f7"])
new_sf.print()
```

{% endtab %}

{% tab title="Browser" %}

```
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Output" %}

```
╔════╤═══╗
║ f1 │ 1 ║
╟────┼───╢
║ f2 │ 2 ║
╟────┼───╢
║ f3 │ 3 ║
╟────┼───╢
║ f4 │ 4 ║
╟────┼───╢
║ f5 │ a ║
╟────┼───╢
║ f6 │ b ║
╟────┼───╢
║ f7 │ c ║
╚════╧═══╝
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://danfo.jsdata.org/api-reference/series/series.append.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
