python二维数据读取对齐_python如何在pandas dataframe中很好地对齐长文本?

给定panda的数据帧(从数据库接收),我试图将结果输出到控制台,这样它将完整并且可读。在

我面临的挑战是关于2的长文本列:LPQ_原因&LPQ_分辨率(amp;L)。您将从下面的输出(print df)中注意到,两个LPQ列都以3个点(...)结尾,因此我无法阅读文本。尽管我的初始设置是:pd.set_option('display.max_rows', 1500)

pd.set_option('display.max_columns', 1500)

pd.set_option('display.width', 1000)

所以控制台上的结果如下:

^{pr2}$

我正在寻找的最佳解决方案(如果可行)是打印整行,以便:ID DIS_CASE_ID CREATION_DATE type_2 LPQ_REASON LPQ_RESOLUTION RESOLUTION_CODE

0 727990 61180481 2017-01-05 13:47:05 7891 The LPQ we know is shorto add is 25% (here This Memo was issued with conjunction to our 3979

comes the rest of the sentence. it might be analysis to foster a better bs when writing

long, or not, it might be short or whatever)

1 727889 61180482 2017-01-05 13:51:09 7891 The LPQ he collide will increase 15% yes and This Memo was issued on matching viloation for 3979

here I'm going to write the entire sentence who cares on what violation. just issued.

as if I really remember what was written. ha

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值