-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathREADME
More file actions
31 lines (22 loc) · 676 Bytes
/
README
File metadata and controls
31 lines (22 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Some of the capabilities of the table library are shown below::
from table import Table
table = Table(
["1", "2", "3"] # row names,
["a", "b"] # column names,
[[1, 2], # initial values
[3, 4],
[5, 6]]
)
print "Whole table:"
print table
print "Just a cell:"
print table["1", "a"]
print "A row:"
print table["2", :]
print "A column:"
print table[:, "b"]
print "A range:"
print table["2":, :]
The library also provides basic I/O capability for simple delimited files and standard CSV files::
table1 = readTableFromDelimited(f)
table2 = readTableFromCSV(f)