Skip to content

Commit 271d6e5

Browse files
committed
Updated a tutorial in README
1 parent ebba468 commit 271d6e5

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

README.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,7 @@ series keys: #(k1 k2 k3).
3131
```
3232

3333
### Creating a DataFrame
34-
There are four ways of creating a data frame:
35-
1. Creating an empty data frame, then filling it with data
36-
2. Creating a data frame from an array of rows
37-
3. Creating a data frame from an array of columns
38-
4. Reading data from a file
39-
40-
#### Creating an empty DataFrame
41-
You can create an empty instance of `DataFrame` using the `new` message
42-
43-
```smalltalk
44-
df := DataFrame new.
45-
```
46-
The data can be added later using the `add:` message.
47-
```smalltalk
48-
df add: #('Barcelona' 1.609 true).
49-
```
50-
51-
#### Creating a DataFrame from an array of rows
52-
This way is the best for creating simple examples for testing since you can see how the data will be arranged in your data frame.
34+
The easiest way to create an object of `DataFrame` class is by passing it an array of rows or columns (an array of arrays). Creating a DataFrame from rows allows us to see how the data will be arranged in a table. It's very readable and can be handy if we need to write some simple examples for testing
5335

5436
```smalltalk
5537
df := DataFrame fromRows: #(
@@ -58,7 +40,6 @@ df := DataFrame fromRows: #(
5840
('London' 8.788 false)).
5941
```
6042

61-
#### Creating a DataFrame from an array of columns
6243
We can do the same by passing an array of columns
6344

6445
```smalltalk

0 commit comments

Comments
 (0)