Henry Carscadden
unread,Jun 1, 2021, 5:30:02 AM6/1/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SNAP Users Group
When loading a SNAP TTable with LoadSS, new columns are added mysteriously. Below is an example of the problem:
**Input File:**
_"test_graph6.1.mapping.txt"_
```
# original_id new_id
d 0
c 1
b 2
a 3
```
**Python shell:**
```
>>> import snap
>>> schema = snap.Schema()
>>> schema.Add(snap.TStrTAttrPr("original_id", snap.atStr))
0
>>> schema.Add(snap.TStrTAttrPr("new_id", snap.atInt))
1
>>> context = snap.TTableContext()
>>> ttable = snap.TTable.LoadSS(schema, "test_graph6.1.mapping.txt", context, "\t", snap.TBool(False))
>>> ttable.SaveSS("test.out")
```
**Output file:**
_test.out_
```
# original_id new_id _id
d 0 0
c 1 1
b 2 2
a 3 3
```