---
title: sum()
framework: createml
role: symbol
role_heading: Instance Method
path: createml/mldatacolumn/sum()
---

# sum()

Returns the sum of the elements in a column of doubles.

## Declaration

```swift
func sum() -> Double?
```

## Return Value

Return Value A Double; otherwise nil if the column is invalid.

## See Also

### Getting sum, mean, and standard deviation values

- [mean()](createml/mldatacolumn/mean().md)
- [std()](createml/mldatacolumn/std().md)
- [stdev()](createml/mldatacolumn/stdev().md)
