Pandas常用函數(shù)總結(jié)

pandas常用函數(shù):
一般的,我們使用如下縮寫:
df:任意的Pandas DataFrame對(duì)象
s:任意的Pandas Series對(duì)象
模塊的導(dǎo)入:

import pandas as pd
import numpy as pd

https://www.cnblogs.com/ly803744/p/10468307.html

Series
https://blog.csdn.net/kingov/article/details/79513322
Pipeline
https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.make_pipeline.html

  1. apply()函數(shù)
    http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.apply.html

https://blog.csdn.net/qq_19528953/article/details/79348929

  1. fillna()函數(shù)
    https://blog.csdn.net/qq_21840201/article/details/81008566
    3.one hot 獨(dú)熱編碼
    https://blog.csdn.net/yueyao121107/article/details/79730934
    4.pandas的get_dummies
    http://www.itdecent.cn/p/c324f4101785
    get_dummies是將擁有不同值的變量轉(zhuǎn)換為0/1數(shù)值
    5.pandas.DataFrame.notnull
    http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.notnull.html
    返回非空值
    notnull()返回值是布爾型(0-1矩陣)的矩陣。再取df[布爾型矩陣]返回的是id為非空的行
    isnull()同理返回空值
    https://blog.csdn.net/waiwai3/article/details/80736714
    6.pandas.DataFrame.as_matrix
    DataFrame.as_matrix([columns]) 轉(zhuǎn)換為矩陣
    https://blog.csdn.net/hhtnan/article/details/80080240
    7.pandas.DataFrame.loc()
    http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.loc.html
    iloc,即index locate 用index索引進(jìn)行定位,所以參數(shù)是整型,如:df.iloc[10:20, 3:5]
    loc,則可以使用column名和index名進(jìn)行定位,如:
    df.loc[‘image1’:‘image10’, ‘a(chǎn)ge’:‘score’]
    https://blog.csdn.net/missyougoon/article/details/83375375
    8.groupby()
    https://www.zhangshengrong.com/p/q0Xpqj4j1K/
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容