Reputation: 25
I need to update every field in a column of a table
I am using data extracted with the petl.fromdb()
method, which produces an OrderedDict
object
I want to convert the data back to a table by using petl.fromdict()
However, it appears that the data is not loading from the dictionary into a table format, as printing the new table produces a blank outcome
This is the very simplest verion of the code, without any transformation attempted
table = petl.fromdb(conn, sql)
print(table)
records = petl.columns(table)
newtable = petl.fromdicts(records)
print(newtable)
The print(table)
command prints the table as expected, but the output for print(newtable)
is
+
|
+
|
+
|
+
|
+
|
+
|
+
...
Upvotes: 0
Views: 22