Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P6259
(An Untitled Masterwork)
Active
Public
Actions
Authored by
EBernhardson
on Nov 3 2017, 4:38 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F10590901:
Nov 3 2017, 4:38 PM
2017-11-03 16:38:24 (UTC+0)
Subscribers
None
rows = df.collect()
keys = [(key, max([len(unicode(r[key])) for r in rows])) for key in df.columns]
format = ' | '.join(['%%%ds' % (v) for k,v in keys])
for row in rows:
try:
print format % tuple([unicode(row[k]) for k, v in keys])
except:
print row
Event Timeline
EBernhardson
created this paste.
Nov 3 2017, 4:38 PM
2017-11-03 16:38:24 (UTC+0)
Log In to Comment