Python中print(df.head()) 是什么意思
IJt影風(fēng)網(wǎng)df是DataFrame的縮寫,這里表示讀取進(jìn)來的數(shù)據(jù),比如,最簡單的一個實(shí)例:IJt影風(fēng)網(wǎng)
import pandas as pdIJt影風(fēng)網(wǎng)
df = pd.read_excel(r'C:\Users\Shan\Desktop\x.xlsx')IJt影風(fēng)網(wǎng)
print(df.head())IJt影風(fēng)網(wǎng)
df.head()會將excel表格中的第一行看作列名,并默認(rèn)輸出之后的五行,在head后面的括號里面直接寫你想要輸出的行數(shù)也行,比如2,10,100之類的。IJt影風(fēng)網(wǎng)
excel表:IJt影風(fēng)網(wǎng)
IJt影風(fēng)網(wǎng)
輸出結(jié)果:IJt影風(fēng)網(wǎng)
IJt影風(fēng)網(wǎng)
IJt影風(fēng)網(wǎng)英文head是什么意思
IJt影風(fēng)網(wǎng)n. 頭;頭痛;上端;最前的部分;理解力
IJt影風(fēng)網(wǎng)vt. 前進(jìn);用頭頂;作為…的首領(lǐng);站在…的前頭;給…加標(biāo)題
IJt影風(fēng)網(wǎng)vi. 出發(fā);成頭狀物;船駛往
IJt影風(fēng)網(wǎng)adj. 頭的;主要的;在頂端的
IJt影風(fēng)網(wǎng)n. (Head)人名;(英)黑德
IJt影風(fēng)網(wǎng)英語head中文翻譯是什么意思
IJt影風(fēng)網(wǎng)head英 [hed] ? 美 [h?d]的中文意思:IJt影風(fēng)網(wǎng)
1、n.頭部,頭腦,上端,首腦,首長。IJt影風(fēng)網(wǎng)
2、vt.用頭頂,前進(jìn),作為…的首領(lǐng),站在…的前頭。IJt影風(fēng)網(wǎng)
3、vi.朝…行進(jìn),出發(fā),向…方向移動,船駛往。IJt影風(fēng)網(wǎng)
4、adj.頭的,在前頭的,首要的,在頂端的。IJt影風(fēng)網(wǎng)
head的用法示例如下:IJt影風(fēng)網(wǎng)
1、Why?don't?you?go?for?a?walk?to?clear?your?head??IJt影風(fēng)網(wǎng)
你為什么不散散步,清醒一下頭腦呢?IJt影風(fēng)網(wǎng)
2、Instead?of?always?depending?on?the?dictionary,?use?your?head?first.?IJt影風(fēng)網(wǎng)
IJt影風(fēng)網(wǎng)
不要總是倚賴字典,先用你的頭腦。IJt影風(fēng)網(wǎng)
IJt影風(fēng)網(wǎng)
擴(kuò)展資料:IJt影風(fēng)網(wǎng)
head的近義詞:IJt影風(fēng)網(wǎng)
1、topIJt影風(fēng)網(wǎng)
英 [t?p] ? 美 [tɑ:p] ?IJt影風(fēng)網(wǎng)
n.頂,頂部;(箱子)蓋,(書頁等的)上欄;首席;陀螺。IJt影風(fēng)網(wǎng)
adj.最高的;頂上的;頭等的;最大的。IJt影風(fēng)網(wǎng)
vt.形成頂部;達(dá)到…的頂端;處于…的最前頭;領(lǐng)導(dǎo)。IJt影風(fēng)網(wǎng)
Viewed?from?the?top?of?Mount?Tai,?the?sunrise?was?indeed?a?spectacle.?IJt影風(fēng)網(wǎng)
從泰山頂上看去,日出真是個奇觀。IJt影風(fēng)網(wǎng)
2、brainIJt影風(fēng)網(wǎng)
英 [bre?n] ? 美 [bren] ?IJt影風(fēng)網(wǎng)
n.腦;智慧;聰明的人;(群體中)最聰明的人。IJt影風(fēng)網(wǎng)
vt.打破…的腦袋;打…的頭部。IJt影風(fēng)網(wǎng)
Once?you?stop?using?your?brain?you?soon?go?stale?IJt影風(fēng)網(wǎng)
一旦停止用腦,人很快就會變得遲鈍。IJt影風(fēng)網(wǎng)