<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/DataFrame/append(_:)-36sor",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData0B5FrameV6appendyyACF"
  },
  "title" : "append(_:)"
}
-->

# append(_:)

Adds the rows of another data frame.

```
mutating func append(_ other: DataFrame)
```

## Parameters

`other`

Another data frame. The columns in `other` that have the same name as columns in the data
frame must also have the same type.

## Discussion

The method ignores columns in `other` that don’t exist in the data frame.
It fills the values for columns in the data frame that don’t exist in `other` to `nil`.
It raises a fatal error if columns with the same name have different types.
The following code shows how to check that the columns match.

```
func columnTypesAreEqual(_ left: DataFrame, _ right: DataFrame) -> Bool {
    for rightColumn in right.columns {
        guard let index = left.indexOfColumn(rightColumn.name) else {
            continue
        }
        let leftColumn = left.columns[index]
        if leftColumn.wrappedElementType != rightColumn.wrappedElementType {
            return false
        }
    }
    return true
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)