diff --git a/README.md b/README.md
index 937fd14..e7961af 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ However, with some Reflection magic it is possible to do without this. This is w
Here is an example:
```groovy
-@Grab('se.alipsa.groovy:data-utils:1.0.0')
+@Grab('se.alipsa.groovy:data-utils:1.0.2')
@Grab('org.postgresql:postgresql:42.4.0')
import se.alipsa.groovy.datautil.SqlUtil
@@ -31,7 +31,7 @@ data-utils is available from maven central
Groovy:
```groovy
-implementation "se.alipsa.groovy:data-utils:1.0.1"
+implementation "se.alipsa.groovy:data-utils:1.0.2"
```
Maven:
@@ -39,12 +39,15 @@ Maven:
se.alipsa.groovy
data-utils
- 1.0.1
+ 1.0.2
```
## Version history
+### 1.0.2, 2022-08-17
+- Add TableUtil with support for frequency tables
+
### 1.0.1, 2022-07-25
- Upgrade to Groovy 4.0.4
- Build script fixes
diff --git a/build.gradle b/build.gradle
index b1c457b..388b696 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,14 +13,17 @@ repositories {
dependencies {
def groovyVersion = "[4.0.4, )"
+ def tablesawVersion = "[0.43.1, )"
implementation "org.apache.groovy:groovy:${groovyVersion}"
implementation "org.apache.groovy:groovy-sql:${groovyVersion}"
+ implementation "tech.tablesaw:tablesaw-core:${tablesawVersion}"
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
testImplementation 'com.h2database:h2:2.1.214'
+ testImplementation "org.slf4j:slf4j-simple:1.7.36"
}
group = 'se.alipsa.groovy'
-version = '1.0.1'
+version = '1.0.2'
description = 'Java FX GUI for Groovy based data science analysis and applications'
java.sourceCompatibility = JavaVersion.VERSION_17
diff --git a/src/main/groovy/se/alipsa/groovy/datautil/TableUtil.groovy b/src/main/groovy/se/alipsa/groovy/datautil/TableUtil.groovy
new file mode 100644
index 0000000..85f6122
--- /dev/null
+++ b/src/main/groovy/se/alipsa/groovy/datautil/TableUtil.groovy
@@ -0,0 +1,45 @@
+package se.alipsa.groovy.datautil
+
+import tech.tablesaw.api.ColumnType
+import tech.tablesaw.api.Row
+import tech.tablesaw.api.Table
+import tech.tablesaw.columns.Column
+
+import java.math.RoundingMode
+import java.util.concurrent.atomic.AtomicInteger
+
+class TableUtil {
+
+ static Table frequency(Column> column) {
+ Map