国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法

這篇具有很好參考價(jià)值的文章主要介紹了python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

一、numpy

import numpy as np

1.numpy 數(shù)組 和 list 的區(qū)別

輸出方式不同
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

里面包含的元素類型
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

2.構(gòu)造并訪問二維數(shù)組

使用 索引/切片 訪問ndarray元素

切片 左閉右開

np.array(list)

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

3.快捷構(gòu)造高維數(shù)組

  • np.arange()

  • np.random.randn() - - - 服從標(biāo)準(zhǔn)正態(tài)分布- - - 數(shù)學(xué)期望 μ - - - 標(biāo)準(zhǔn)方差 s
    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
    使用matplotlib.pyplot模塊驗(yàn)證標(biāo)準(zhǔn)正態(tài)分布
    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

  • np.random.randint(起始數(shù),終止數(shù)(行,列))

4.改變數(shù)組的形狀 幾行幾列 reshape

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

二、pandas

數(shù)據(jù)分析 - - - 數(shù)據(jù)清洗 - - - 控制過(guò)濾 - - - 異常值捕獲

map分組 聚合

import numpy as np
import pandas as pd

pandas善于處理二維數(shù)據(jù)

1.數(shù)據(jù)結(jié)構(gòu) Series 和 DataFrame

Series

series類似于通過(guò)numpy產(chǎn)生的一維數(shù)據(jù),但series包含索引(可以自己定)
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

DataFrame

DataFrame是一種二維表格數(shù)據(jù)結(jié)構(gòu)

創(chuàng)建方法:

  1. 通過(guò)列表創(chuàng)建

    行索引是index,列索引是columns

    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

    先創(chuàng)建一個(gè)空的DataFrame,通過(guò)列表生成DataFrame

    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

  2. 通過(guò)字典創(chuàng)建

    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
    簡(jiǎn)單創(chuàng)建
    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
    將字典鍵變成行索引 - - - from_dict - - - orient(朝向)或者使用 T
    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

    data = {'a':[1,3,5],'b':[2,4,6]}
    pd.DataFrame(data = data)
    
    pd.DataFrame.from_dict(data,orient='index')
    

    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

  3. 通過(guò)二維數(shù)組創(chuàng)建

    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

    np.arange(12)	# array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11])
    

2.修改索引

set_index 把常規(guī)行變成索引列

不會(huì)修改原始數(shù)據(jù),若希望修改,使用 inplace=True

data.set_index(‘index’, inplace=True)

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

修改列名稱 rename

修改列名稱,使用columns - - - 行 index
使用字典來(lái)表達(dá)映射關(guān)系 - - - {原始數(shù)據(jù):新數(shù)據(jù)}
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

將行索引變成常規(guī)列 reset_index()

若想修改原始數(shù)據(jù) 使用reset_index(replace=True)
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

3.Excel或csv數(shù)據(jù)的讀取和寫入

pd.read_excel(file_name, sheet_name=0, index_col=0)
從左到右,第一個(gè)sheet索引是0,該函數(shù)返回該頁(yè)內(nèi)容 - - - 會(huì)將第一行變?yōu)榱兴饕?- - - 行索引從0開始
index_col=0 :將第一列變成行索引
header=0:將第一行變成列索引 - - - header=[0,1] 將前兩行變成列索引

xxx.to_excel(file_name):將數(shù)據(jù)寫到新的Excel文件

pd.read_csv(file_name, sep=','):讀取csv文件,sep默認(rèn)逗號(hào)分隔
index_col - - - header
xxx.to_csv(file_name)

4.pandas數(shù)據(jù)的讀取和篩選

df = pd.DataFrame(data=[[1,2,3],[4,5,6],[7,8,9]],index=['r1','r2','r3'],columns=['c1','c2','c3'])

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

  • 讀取 列 xxx[‘xxx’]
    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
  • 讀取 行 xx.loc[‘xxx’]

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

  • df.head()
    默認(rèn)查看前5行,出入幾查看幾行

  • 查看特殊的數(shù)據(jù) 按照特定條件篩選

    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

5.數(shù)據(jù)整體情況查看

  • df.shape - - - 查看數(shù)據(jù)有幾行幾列
  • df.describe() - - - 查看一些統(tǒng)計(jì)指標(biāo) – 每一列的個(gè)數(shù) 均值 標(biāo)準(zhǔn)方差 最小值 最大值
  • df.info() - - - 查看表格數(shù)據(jù)的信息 - - - 每一列的個(gè)數(shù) 是否有空值 每一列的類型

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

  • df.value_counts() - - - df.loc[‘r2’].value_counts()
    查看某行或某列有哪些數(shù)據(jù),以及這些次數(shù)出現(xiàn)的頻次
    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

6.數(shù)據(jù)運(yùn)算

  • 從已有的列,通過(guò)數(shù)據(jù)運(yùn)算創(chuàng)造一個(gè)新的列
    python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
  • sum 求和 mean 均值 axis=0 is 列(默認(rèn)) axis=1 is 行
    求列方向的聚合值

7.數(shù)據(jù)映射 map()

map()根據(jù)列對(duì)數(shù)據(jù)進(jìn)行映射

map是一個(gè)循環(huán)遍歷的過(guò)程

people = pd.DataFrame(data={
    '身高':np.random.randint(130,180,10),
    'age':np.random.randint(18,23,10)
})

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

def map_high(x):
    if x >= 170:
        return '高'
    else:
        return '低'

people['高/低'] = people['身高'].map(map_high)

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

8.空值的填充和查找

NaN空值·

寫入空值

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

填充空值 fillna()

表格數(shù)據(jù)如果顯示NaN,表示此處為空值fillna()函數(shù),可以填充空值
inplace=True表示寫入到數(shù)據(jù)內(nèi)存

people.fillna(value=0, inplace=True)

將空值NaN使用value替換

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

查找空值 isnull()

是NaN,返回True - - - True is 1
不是返回False - - - False is 0

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
xxx.isnull().sum() 對(duì)布爾值進(jìn)行列方向的求和 - - - - 求出每一列空值的個(gè)數(shù)

三、matplotlib

import numpy as np
import pandas as pd

import matplotlib.pyplot as plt
%matplotlib inline

1.折線圖 plt.plot()

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

color 線的顏色
linewidth 線的寬度 像素
linestyle 線的風(fēng)格

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
dashed 虛線 dashdot 虛線和點(diǎn) dotted 點(diǎn)

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

# 可以省略,但建議寫上,強(qiáng)制將前面的繪圖代碼渲染出來(lái)
plt.show()
x = [1,2,3]
y = [2,4,6]
plt.plot(x,y)

a = [1,3,5]
b = [1,2,3]
plt.plot(a,b)
# 可以省略,但建議寫上,強(qiáng)制將前面的繪圖代碼渲染出來(lái)
plt.show()

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

2.柱狀圖 plt.bar()

條形圖的橫軸可以是字符串,起標(biāo)識(shí)作用

x = ['A','B','C','D']
y = [13,17,15,14]
# plt.bar(x,y, color=['red','blue'])
plt.bar(x,y,color=np.random.random((4,3)))

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

3.散點(diǎn)圖 plt.scatter()

回歸問題

# 橫軸數(shù)據(jù)
x = [1.3, 4,5.8,7.4]
# 縱軸數(shù)據(jù)
y = [20,30,40,50]
# 大小  也可以表達(dá)第三維數(shù)據(jù)
size = np.array([1,4,9,16])
plt.scatter(x,y,s=size*10,c=(1,2,3,4))

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

四、pandas 自帶的繪圖函數(shù)

DataFrame

# 從10到100隨機(jī)生成一個(gè)數(shù)據(jù)
np.random.randint(10,100)   # 74
# 10行3列
np.random.randint(10,100,size=(10,3))

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

df = pd.DataFrame(data=np.random.randint(10,100, size=(10,3)),columns=['A','B','C'])
df.plot(kind='bar')

kind默認(rèn)是line
hist 直方圖 - - - pie 餅圖 - - - box 箱體圖 - - - area 面積圖
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
T轉(zhuǎn)置操作
python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas
Series

df = pd.Series(data=np.random.randint(1,10,size=5),index=['A','B','C','D','E'])
df.plot(kind='bar',color='red')

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

1.添加文字說(shuō)明 標(biāo)題 坐標(biāo)軸

np.random.random(3)
# array([0.62461037, 0.88015921, 0.78706271])
# 從0到2π拆分成100個(gè)數(shù),等差數(shù)列
x = np.linspace(0,2*np.pi, num=100)
y = np.sin(x)
# label 是圖例要展示的內(nèi)容
plt.plot(x,y,color=np.random.random(3),label='line of sin',linestyle='--')
# 允許展示圖例 loc參數(shù)可選
plt.legend(loc='lower right')
plt.xlabel('X')
plt.ylabel('Y')
plt.title('Y=sinX')

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

plt.plot(x,np.sin(x),label='sin')
plt.plot(x,np.cos(x),label='cos')
plt.legend(loc='upper right')

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

2.label中文報(bào)錯(cuò)解決方法

使用matplotlib畫圖,默認(rèn)不支持中文顯示

plt.rcParams		# 可以查看一些默認(rèn)屬性
plt.rcParams['font.sans-serif']='SimHei'	# 用來(lái)正常顯示中文標(biāo)簽
plt.rcParams['axes.unicode_minus']=False	# 解決符號(hào)'-'顯示為方框的問題

plt.plot(x,np.sin(x),label='正弦函數(shù)')
plt.plot(x,np.cos(x),label='余弦函數(shù)')
plt.legend(loc='upper right')
plt.title('函數(shù)')

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas

五、繪制多個(gè)圖表 subplot()

三個(gè)參數(shù)

plt.subplot(221) 兩行兩列第一個(gè)

# 調(diào)整圖表大小
plt.figure(figsize=(12,8))

ax1 = plt.subplot(221)
ax1.plot(x,np.sin(x))

ax2 = plt.subplot(222)
ax2.plot(x,np.cos(x))

ax3 = plt.subplot(223)
ax3.bar(['a','b','c'],[1,2,3])

ax4 = plt.subplot(224)
# ax4.pie(sizes=[30,40,30],labels=['A','B','C'],colors=['red','blue','yellow'])
ax4.pie(np.array([10, 20, 30, 40]))

plt.show()

python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法,python,數(shù)據(jù)分析,jupyter,plotly,matplotlib,numpy,pandas文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-693765.html

到了這里,關(guān)于python-數(shù)據(jù)分析-numpy、pandas、matplotlib的常用方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 【數(shù)據(jù)分析】matplotlib、numpy、pandas速通

    【數(shù)據(jù)分析】matplotlib、numpy、pandas速通

    教程鏈接:【python教程】數(shù)據(jù)分析——numpy、pandas、matplotlib 資料:https://github.com/TheisTrue/DataAnalysis 官網(wǎng)鏈接:可查詢各種圖的使用及代碼 對(duì)比常用統(tǒng)計(jì)圖 (1)引入 (2) 示例 (3) 設(shè)置圖片大小 figsize: 圖片的 (長(zhǎng), 寬) dpi: 每英寸像素點(diǎn)的個(gè)數(shù),例如選定為 80 (圖像模糊

    2024年01月24日
    瀏覽(25)
  • 郭煒老師mooc第十一章數(shù)據(jù)分析和展示(numpy,pandas, matplotlib)

    郭煒老師mooc第十一章數(shù)據(jù)分析和展示(numpy,pandas, matplotlib)

    numpy創(chuàng)建數(shù)組的常用函數(shù) ?numpy數(shù)組常用屬性和函數(shù) ?numpy數(shù)組元素的增刪 在numpy數(shù)組中查找元素? np.argwhere( a ):返回非0的數(shù)組元組的索引,其中a是要索引數(shù)組的條件。 np.where(condition) 當(dāng)where內(nèi)只有一個(gè)參數(shù)時(shí),那個(gè)參數(shù)表示條件,當(dāng)條件成立時(shí),? ? ? ? ?? where返回的是每個(gè)

    2024年03月15日
    瀏覽(23)
  • 數(shù)據(jù)分析 — Matplotlib 、Pandas、Seaborn 繪圖

    數(shù)據(jù)分析 — Matplotlib 、Pandas、Seaborn 繪圖

    Matplotlib 是一個(gè)用于 繪制數(shù)據(jù)可視化圖形的 Python 庫(kù) 。它提供了豐富的繪圖工具,可以用于創(chuàng)建各種類型的圖表。 安裝和導(dǎo)入: pip install matplotlib import matplotlib.pyplot as plt # 導(dǎo)入 Matplotlib 庫(kù) 圖表適用場(chǎng)景總結(jié): 1、折線圖:表示數(shù)據(jù)的趨勢(shì)情況,如幾年每個(gè)月份的銷量走勢(shì)、

    2024年02月19日
    瀏覽(22)
  • 【100天精通Python】Day55:Python 數(shù)據(jù)分析_Pandas數(shù)據(jù)選取和常用操作

    目錄 Pandas數(shù)據(jù)選擇和操作 1 選擇列和行 2 過(guò)濾數(shù)據(jù) 3 添加、刪除和修改數(shù)據(jù)

    2024年02月09日
    瀏覽(22)
  • NumPy 和 Pandas 數(shù)據(jù)分析實(shí)用指南:1~6 全

    原文:Hands-On Data Analysis with NumPy and pandas 協(xié)議:CC BY-NC-SA 4.0 譯者:飛龍 在本章中,我們將介紹以下主題: 安裝 Anaconda 探索 Jupyter 筆記本 探索 Jupyter 的替代品 管理 Anaconda 包 配置數(shù)據(jù)庫(kù) 在本章中,我們將討論如何安裝和管理 Anaconda。 Anaconda 是一個(gè)包,我們將在本書的以下各

    2023年04月14日
    瀏覽(25)
  • NumPy和Pandas庫(kù)的基本用法,用于數(shù)據(jù)處理和分析

    當(dāng)涉及到數(shù)據(jù)處理和分析時(shí),NumPy和Pandas是兩個(gè)非常常用的Python庫(kù)。下面是它們的基本用法: NumPy(Numerical Python): 導(dǎo)入NumPy庫(kù):在代碼中使用import numpy as np導(dǎo)入NumPy庫(kù)。 創(chuàng)建NumPy數(shù)組:使用np.array()函數(shù)可以創(chuàng)建一個(gè)NumPy數(shù)組。例如,arr = np.array([1, 2, 3, 4, 5])創(chuàng)建一個(gè)包含整數(shù)

    2024年02月11日
    瀏覽(39)
  • 【Python數(shù)據(jù)分析】數(shù)據(jù)分析之numpy基礎(chǔ)

    【Python數(shù)據(jù)分析】數(shù)據(jù)分析之numpy基礎(chǔ)

    實(shí)驗(yàn)環(huán)境:建立在Python3的基礎(chǔ)之上 numpy提供了一種數(shù)據(jù)類型,提供了數(shù)據(jù)分析的運(yùn)算基礎(chǔ),安裝方式 導(dǎo)入numpy到python項(xiàng)目 本文以案例的方式展示numpy的基本語(yǔ)法,沒有介紹語(yǔ)法的細(xì)枝末節(jié),筆者認(rèn)為通過(guò)查閱案例就能掌握基本用法。 numpy數(shù)組的基本概念 numpy默認(rèn)所有元素具有

    2024年02月10日
    瀏覽(27)
  • [數(shù)據(jù)分析大全]基于Python的數(shù)據(jù)分析大全——Numpy基礎(chǔ)

    [數(shù)據(jù)分析大全]基于Python的數(shù)據(jù)分析大全——Numpy基礎(chǔ)

    NumPy 的全稱為 Numeric Python,它是 Python 的第三方擴(kuò)展包,主要用來(lái)計(jì)算、處理一維或多維數(shù)組。 ??步入8月了,7月時(shí)因?yàn)轫?xiàng)目所需,自學(xué)了 深度學(xué)習(xí) 相關(guān)的內(nèi)容,現(xiàn)在 已經(jīng)把項(xiàng)目所需要的神經(jīng)網(wǎng)絡(luò)框架搭建起來(lái)了,輸入輸出也都?xì)w一化了,模擬誤差也加上了,圖像的參數(shù)

    2024年02月14日
    瀏覽(26)
  • Python 數(shù)據(jù)分析——matplotlib 快速繪圖

    Python 數(shù)據(jù)分析——matplotlib 快速繪圖

    matplotlib采用面向?qū)ο蟮募夹g(shù)來(lái)實(shí)現(xiàn),因此組成圖表的各個(gè)元素都是對(duì)象,在編寫較大的應(yīng)用程序時(shí)通過(guò)面向?qū)ο蟮姆绞绞褂胢atplotlib將更加有效。但是使用這種面向?qū)ο蟮恼{(diào)用接口進(jìn)行繪圖比較煩瑣,因此matplotlib還提供了快速繪圖的pyplot模塊。本節(jié)首先介紹該模塊的使用方法

    2024年02月11日
    瀏覽(26)
  • Python數(shù)據(jù)分析-Pandas

    個(gè)人筆跡,建議不看 Series類型 DataFrame類型 是一個(gè)二維結(jié)構(gòu),類似于一張excel表 DateFrame只要求每列的數(shù)據(jù)類型相同就可以了 查看數(shù)據(jù) 讀取數(shù)據(jù)及數(shù)據(jù)操作 行操作 條件選擇 缺失值及異常值處理 判斷缺失值: 填充缺失值: 刪除缺失值 age count 2.000000 mean 1.500000 std 0.707107 min 1

    2024年02月10日
    瀏覽(33)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包