Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
242 views
in Technique[技术] by (71.8m points)

python - printing the records of a table with PETL package without having the character "u"

import petl as etl from petl import fromtext, capture, skip

table1 = fromtext('text_.txt')

table2 = capture(table1, 'lines', '(.)|(.)|(.*)$')

table2 = skip(table2, 1)
print(table2)

table__QUESTION = etl.records(table2)

print(table__QUESTION )# <=================

the print gives the following:

(u'a1', u'', u'AA3333333333') (u'a2', u'[email protected]', u'BB3333333333') ........

is there any way to have these records printed

without the character << u >> in front , such as ????:

('a1', '', 'AA3333333333') ('a2', '[email protected]', 'BB3333333333') ....

question from:https://stackoverflow.com/questions/65941919/printing-the-records-of-a-table-with-petl-package-without-having-the-character

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...