@@ -47,7 +47,7 @@ In this introduction, we'll cover some of the basic features of Tablesaw using a
47
47
* Adding and removing columns
48
48
* Printing the first few rows for a peak at the data
49
49
* Sorting a table by column name
50
- * Run descriptive statistics (mean, min, max, etc.) on a numeric column
50
+ * Running descriptive statistics (mean, min, max, etc.) on a numeric column
51
51
* Performing mapping operations over columns
52
52
* Filtering rows
53
53
* Calculating totals and sub-totals
@@ -71,7 +71,6 @@ Often, the best way to start is to print the column names for reference:
71
71
``` java
72
72
73
73
out(tornadoes. columnNames());
74
- out(tornadoes. shape());
75
74
```
76
75
which produces:
77
76
@@ -80,7 +79,7 @@ which produces:
80
79
[Date , Time , State , State No , Scale , Injuries , Fatalities , Start Lat , Start Lon , Length , Width ]
81
80
```
82
81
83
- The _ shape()_ method displays the row and column count :
82
+ The _ shape()_ method displays the row and column counts :
84
83
85
84
``` java
86
85
@@ -113,8 +112,7 @@ The _structure()_ method shows the index, name and type of each column
113
112
114
113
115
114
```
116
- Note the print() method in _ tornadoes.structure().print()_
117
-
115
+ Note the print() method in _ tornadoes.structure().print()_ .
118
116
Like many Tablesaw methods, _ structure()_ returns a table object, and print() produces a
119
117
string representation of that object for display. Because structure returns a table, you can perform other operations on it, like:
120
118
@@ -186,6 +184,7 @@ Now that we've some some data, lets sort the table in reverse order by the id co
186
184
187
185
### Descriptive statistics
188
186
187
+ Descriptive statistics are calculated using the _describe()_ method:
189
188
```java
190
189
191
190
table.column(" Fatalities " ).describe();
@@ -224,6 +223,11 @@ The last example above returns a table containing only the three columns named i
224
223
225
224
### Performing totals and sub-totals
226
225
226
+ Column metrics can be calculated using methods like sum(), product(), mean(), max(), etc.
227
+
228
+ It is also possible to apply those methods to a table to calculate results on a numeric column,
229
+ grouped by the values in another column.
230
+
227
231
```java
228
232
229
233
IntColumn injuries = tornadoes.intColumn(" Injuries " );
@@ -251,7 +255,7 @@ This produces the following table, in which Group represents the Tornado Scale a
251
255
### Read and write data from the Tablesaw format
252
256
253
257
Once you've imported data, especially large datasets, you can use Tablesaw's own format to save the table.
254
- In Tablesaw format, reads and writes are hundreds of times fater than the equivalent CSV operations.
258
+ In Tablesaw format, reads and writes are an order of magnitude faster than optimized CSV operations.
255
259
256
260
```java
257
261
0 commit comments