欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Jupyter notebook 輸出部分顯示不全的解決方案

 更新時(shí)間:2021年04月23日 14:31:18   作者:Ixiaohuihuihui  
這篇文章主要介紹了Jupyter notebook 輸出部分顯示不全的解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧

在我更換了jupyter主題后,輸出部分總是顯示不全,差兩個(gè)字符;Github上已經(jīng)有人提出了這個(gè)問題,并有了解決方案,親測有效。

在這個(gè)路徑,打開custom文件夾

在這里插入圖片描述

打開custom.css文件:

replace the current div.output_area with the following in the custom css file:

div.output_area {
display: -webkit-box;
padding: 13px;
}

在這里插入圖片描述

這個(gè)13px,可能有的人改了以后,還是顯示不全,可以多試幾個(gè)數(shù),因?yàn)橛械娜藶g覽器顯示比例不一樣

重新運(yùn)行jupyter notebook,輸出部分顯示不全的問題解決。

補(bǔ)充:jupyter中關(guān)于pandas的dataframe行列顯示不全與復(fù)原

在jupyternote book中,當(dāng)dataframe數(shù)據(jù)的列數(shù)或行數(shù)很多時(shí),默認(rèn)為了減少顯示的面積會(huì)只能顯示其中部分列或行的數(shù)據(jù)。本文記錄如何將數(shù)據(jù)顯示完全和如何復(fù)原默認(rèn)操作。

問題: 列或行顯示不全

如:列顯示不全

解決方式:

pd.set_option('display.max_columns', None)
#顯示所有列
pd.set_option('display.max_columns', None) #原來中間會(huì)有部分列的顯示被省略
data.describe()

還原默認(rèn)配置:reset_option

pd.reset_option("display.max_columns") # 還原默認(rèn)的顯示方式

對(duì)于行顯示不全的解決類似,將display.max_columns改為display_maxrows即可。

也可以指定設(shè)置顯示的行數(shù)。

如: display.max_rows = 60

相關(guān)參數(shù)配置:

編號(hào) 參數(shù) 描述
1 display.max_rows 要顯示的最大行數(shù)
2 display.max_columns 要顯示的最大列數(shù)
3 display.expand_frame_repr 顯示數(shù)據(jù)幀以拉伸頁面
4 display.max_colwidth 顯示最大列寬
5 display.precision 顯示十進(jìn)制數(shù)的精度

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教。

相關(guān)文章

最新評(píng)論