Skip to content

Commit cc2e45b

Browse files
committed
Updated README
1 parent 36f30c7 commit cc2e45b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In this introduction, we'll cover some of the basic features of Tablesaw using a
4747
* Adding and removing columns
4848
* Printing the first few rows for a peak at the data
4949
* 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
5151
* Performing mapping operations over columns
5252
* Filtering rows
5353
* Calculating totals and sub-totals
@@ -71,7 +71,6 @@ Often, the best way to start is to print the column names for reference:
7171
```java
7272

7373
out(tornadoes.columnNames());
74-
out(tornadoes.shape());
7574
```
7675
which produces:
7776

@@ -80,7 +79,7 @@ which produces:
8079
[Date, Time, State, State No, Scale, Injuries, Fatalities, Start Lat, Start Lon, Length, Width]
8180
```
8281

83-
The _shape()_ method displays the row and column count:
82+
The _shape()_ method displays the row and column counts:
8483

8584
```java
8685

@@ -113,8 +112,7 @@ The _structure()_ method shows the index, name and type of each column
113112

114113

115114
```
116-
Note the print() method in _tornadoes.structure().print()_
117-
115+
Note the print() method in _tornadoes.structure().print()_.
118116
Like many Tablesaw methods, _structure()_ returns a table object, and print() produces a
119117
string representation of that object for display. Because structure returns a table, you can perform other operations on it, like:
120118

@@ -186,6 +184,7 @@ Now that we've some some data, lets sort the table in reverse order by the id co
186184
187185
### Descriptive statistics
188186
187+
Descriptive statistics are calculated using the _describe()_ method:
189188
```java
190189
191190
table.column("Fatalities").describe();
@@ -224,6 +223,11 @@ The last example above returns a table containing only the three columns named i
224223
225224
### Performing totals and sub-totals
226225
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+
227231
```java
228232
229233
IntColumn injuries = tornadoes.intColumn("Injuries");
@@ -251,7 +255,7 @@ This produces the following table, in which Group represents the Tornado Scale a
251255
### Read and write data from the Tablesaw format
252256
253257
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.
255259
256260
```java
257261

0 commit comments

Comments
 (0)