python - 如何在 Jenkins 控制台上的数据框中打印单行中的所有列?
问题描述
I have created a data frame which contains lot of columns:
for eg.
col1 col2 col3 col4 col4 col5 col6 col7
and each row contains plenty of data in it.
I tried this:
pd.set_option('expand_frame_repr', False)
pd.set_option('display.max_rows', 无)
pd.set_option('display.max_colwidth', 200)
and in output I am getting:
col1 col2 col3 col4
col5 col6
row1 row1 row1 row1
row1 row1..
But I want all this to printed on single line in Jenkins console.
col1 col2 col3 col4 col5 col6
row1 ro1 row1 row1 row1 row1
also I see some of the rows which have too much of that comes like row.....
how can print the full data.
解决方案
你可以使用 to_string
print(data_frame[row:row].to_string())
推荐阅读
- electron - 错误:“请注意,'style-src-elem' 未明确设置”设置时
- php - 具有不同 MySQL 表的可重用 PHP 文件
- c - 在linux中保存和清除终端窗口
- angular - 需要在 Angular 中使用具有唯一值的相同组件超过 2 次
- javascript - 在 React 中使用 api 请求分离包装器
- angular - 我如何获得今天、下一个和上一个按钮的更改事件?
- clickhouse - 如何在 ClickHouse 中删除 EmbeddedRocksDB 表引擎的一行?
- java - 我在 android 中的卡片翻转动画出了什么问题?
- python - 如何从内部函数停止执行外部函数?
- xml - Google 测试:如何从多个测试套件运行中生成单个 xml 报告?