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

《Python數(shù)據(jù)分析技術(shù)?!返?6章使用 Pandas 準(zhǔn)備數(shù)據(jù) 01 Pandas概覽(Pandas at a glance)

這篇具有很好參考價(jià)值的文章主要介紹了《Python數(shù)據(jù)分析技術(shù)棧》第06章使用 Pandas 準(zhǔn)備數(shù)據(jù) 01 Pandas概覽(Pandas at a glance)。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

01 Pandas概覽(Pandas at a glance)

《Python數(shù)據(jù)分析技術(shù)?!返?6章使用 Pandas 準(zhǔn)備數(shù)據(jù) 01 Pandas概覽(Pandas at a glance)

Pandas概述

Wes McKinney developed the Pandas library in 2008. The name (Pandas) comes from the term “Panel Data” used in econometrics for analyzing time-series data. Pandas has many features, listed in the following, that make it a popular tool for data wrangling and analysis.

Wes McKinney 于 2008 年開(kāi)發(fā)了 Pandas 庫(kù)。Pandas 這個(gè)名字來(lái)源于計(jì)量經(jīng)濟(jì)學(xué)中用于分析時(shí)間序列數(shù)據(jù)的術(shù)語(yǔ) “面板數(shù)據(jù)”。Pandas 有許多功能,這些功能使其成為數(shù)據(jù)處理和分析的常用工具。

Pandas provides features for labeling of data or indexing, which speeds up the retrieval of data.

Pandas 提供數(shù)據(jù)標(biāo)簽或索引功能,可加快數(shù)據(jù)檢索速度。

Input and output support: Pandas provides options to read data from different file formats like JSON (JavaScript Object Notation), CSV (Comma-Separated Values), Excel, and HDF5 (Hierarchical Data Format Version 5). It can also be used to write data into databases, web services, and so on.

輸入和輸出支持: Pandas 提供從不同文件格式讀取數(shù)據(jù)的選項(xiàng),如 JSON(JavaScript Object Notation)、CSV(Comma-Separated Values)、Excel 和 HDF5(Hierarchical Data Format Version 5)。它還可用于將數(shù)據(jù)寫(xiě)入數(shù)據(jù)庫(kù)、網(wǎng)絡(luò)服務(wù)等。

Most of the data that is needed for analysis is not contained in a single source, and we often need to combine datasets to consolidate the data that we need for analysis. Again, Pandas comes to the rescue with tailor-made functions to combine data.

分析所需的大部分?jǐn)?shù)據(jù)并不包含在單一來(lái)源中,因此我們經(jīng)常需要合并數(shù)據(jù)集,以整合分析所需的數(shù)據(jù)。Pandas 又一次提供了量身定制的合并數(shù)據(jù)函數(shù)。

Speed and enhanced performance: The Pandas library is based on Cython, which combines the convenience and ease of use of Python with the speed of the C language. Cython helps to optimize performance and reduce overheads.

速度和增強(qiáng)的性能 Pandas 庫(kù)基于 Cython,它將 Python 的方便易用與 C 語(yǔ)言的速度相結(jié)合。Cython 有助于優(yōu)化性能和減少開(kāi)銷(xiāo)。

Data visualization: To derive insights from the data and make it presentable to the audience, viewing data using visual means is crucial, and Pandas provides a lot of built-in visualization tools using Matplotlib as the base library.

數(shù)據(jù)可視化: 要從數(shù)據(jù)中獲得洞察力并將其呈現(xiàn)給受眾,使用可視化手段查看數(shù)據(jù)至關(guān)重要,而 Pandas 使用 Matplotlib 作為基礎(chǔ)庫(kù),提供了大量?jī)?nèi)置可視化工具。

Support for other libraries: Pandas integrates smoothly with other libraries like Numpy, Matplotlib, Scipy, and Scikit-learn. Thus we can perform other tasks like numerical computations, visualizations, statistical analysis, and machine learning in conjunction with data manipulation.

支持其他庫(kù) Pandas 可與 Numpy、Matplotlib、Scipy 和 Scikit-learn 等其他庫(kù)順利集成。因此,我們可以結(jié)合數(shù)據(jù)處理執(zhí)行其他任務(wù),如數(shù)值計(jì)算、可視化、統(tǒng)計(jì)分析和機(jī)器學(xué)習(xí)。

Grouping: Pandas provides support for the split-apply-combine methodology, whereby we can group our data into categories, apply separate functions on them, and combine the results.

分組: Pandas 支持 "拆分-應(yīng)用-合并 "方法,我們可以將數(shù)據(jù)分組,分別應(yīng)用不同的函數(shù),然后合并結(jié)果。

Handling missing data, duplicates, and filler characters: Data often has missing values, duplicates, blank spaces, special characters (like $, &), and so on that may need to be removed or replaced. With the functions provided in Pandas, you can handle such anomalies with ease.

處理缺失數(shù)據(jù)、重復(fù)數(shù)據(jù)和填充字符: 數(shù)據(jù)中經(jīng)常會(huì)有需要?jiǎng)h除或替換的缺失值、重復(fù)數(shù)據(jù)、空白、特殊字符(如 $、&)等。利用 Pandas 提供的函數(shù),您可以輕松處理此類異常情況。

Mathematical operations: Many numerical operations and computations can be performed in Pandas, with NumPy being used at the back end for this purpose.

數(shù)學(xué)運(yùn)算 在 Pandas 中可以執(zhí)行許多數(shù)值運(yùn)算和計(jì)算,NumPy 在后端用于此目的。

環(huán)境準(zhǔn)備

If you have not already installed Pandas, go to the Anaconda Prompt and enter the following command.

如果尚未安裝 Pandas,請(qǐng)轉(zhuǎn)到 Anaconda 提示符并輸入以下命令。

pip install pandas

Once the Pandas library is installed, you need to import it before using its functions. In your Jupyter notebook, type the following to import this library.

安裝好 Pandas 庫(kù)后,在使用其功能之前需要將其導(dǎo)入。在 Jupyter 筆記本中,鍵入以下內(nèi)容導(dǎo)入該庫(kù)。

import pandas as pd

Here, pd is a shorthand name or alias that is a standard for Pandas.

這里,pd 是 Pandas 標(biāo)準(zhǔn)的速記名稱或別名。

For some of the examples, we also use functions from the NumPy library. Ensure that both the Pandas and NumPy libraries are installed and imported.

在部分示例中,我們還使用了 NumPy 庫(kù)中的函數(shù)。確保已安裝并導(dǎo)入 Pandas 和 NumPy 庫(kù)。

You need to download a dataset, “subset-covid-data.csv”, that contains data about the number of cases and deaths related to the COVID-19 pandemic for various countries on a particular date. Please use the following link for downloading the dataset: https://github.com/DataRepo2019/Data-files/blob/master/subset-covid-data.csv

您需要下載一個(gè)名為 "subset-covid-data.csv "的數(shù)據(jù)集,其中包含特定日期不同國(guó)家與 COVID-19 大流行相關(guān)的病例數(shù)和死亡數(shù)的數(shù)據(jù)。請(qǐng)使用以下鏈接下載數(shù)據(jù)集: https://github.com/DataRepo2019/Data-files/blob/master/subset-covid-data.csv文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-817267.html

到了這里,關(guān)于《Python數(shù)據(jù)分析技術(shù)?!返?6章使用 Pandas 準(zhǔn)備數(shù)據(jù) 01 Pandas概覽(Pandas at a glance)的文章就介紹完了。如果您還想了解更多內(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)文章

  • Python數(shù)據(jù)分析:NumPy、Pandas和Matplotlib的使用和實(shí)踐

    Python數(shù)據(jù)分析:NumPy、Pandas和Matplotlib的使用和實(shí)踐

    在現(xiàn)代數(shù)據(jù)分析領(lǐng)域中,Python已成為最受歡迎的編程語(yǔ)言之一。Python通過(guò)龐大的社區(qū)和出色的庫(kù)支持,成為了數(shù)據(jù)科學(xué)家和分析師的首選語(yǔ)言。在Python的庫(kù)中,NumPy、Pandas和Matplotlib是三個(gè)最為重要的庫(kù),它們分別用于處理數(shù)值數(shù)組、數(shù)據(jù)處理和可視化。本文將介紹這三個(gè)庫(kù)的

    2024年02月04日
    瀏覽(29)
  • Python實(shí)戰(zhàn) | 使用 Python 的日志庫(kù)(logging)和 pandas 庫(kù)對(duì)日志數(shù)據(jù)進(jìn)行分析

    專欄集錦,大佬們可以收藏以備不時(shí)之需 Spring Cloud實(shí)戰(zhàn)專欄:https://blog.csdn.net/superdangbo/category_9270827.html Python 實(shí)戰(zhàn)專欄:https://blog.csdn.net/superdangbo/category_9271194.html Logback 詳解專欄:https://blog.csdn.net/superdangbo/category_9271502.html tensorflow專欄:https://blog.csdn.net/superdangbo/category_869

    2024年02月05日
    瀏覽(25)
  • Python 3 中使用 pandas 和 Jupyter Notebook 進(jìn)行數(shù)據(jù)分析和可視化

    Python 3 中使用 pandas 和 Jupyter Notebook 進(jìn)行數(shù)據(jù)分析和可視化

    簡(jiǎn)介 Python 的 pandas 包用于數(shù)據(jù)操作和分析,旨在讓您以直觀的方式處理帶標(biāo)簽或關(guān)聯(lián)數(shù)據(jù)。 pandas 包提供了電子表格功能,但由于您正在使用 Python,因此它比傳統(tǒng)的圖形電子表格程序要快得多且更高效。 在本教程中,我們將介紹如何設(shè)置一個(gè)大型數(shù)據(jù)集, pandas 的 groupby() 和

    2024年02月19日
    瀏覽(34)
  • python-數(shù)據(jù)分析-pandas

    第一種:通過(guò)標(biāo)量創(chuàng)建Series 第二種:通過(guò)列表創(chuàng)建Series 第三種:通過(guò)字典創(chuàng)建Series 第四種:通過(guò)ndarray創(chuàng)建Series values和index 索引和切片 第一種:通過(guò)一維列表構(gòu)成的字典創(chuàng)建DataFrame 姓名 數(shù)學(xué) 語(yǔ)文 計(jì)算機(jī) 0 張三 87 54 34 1 李四 45 76 56 2 王五 34 55 77 3 趙六 98 90 87 姓名 數(shù)學(xué) 語(yǔ)文

    2023年04月23日
    瀏覽(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)
  • Python數(shù)據(jù)分析-數(shù)據(jù)挖掘(準(zhǔn)備數(shù)據(jù)——數(shù)據(jù)建?!P驮u(píng)估——模型應(yīng)用)

    Python數(shù)據(jù)分析-數(shù)據(jù)挖掘(準(zhǔn)備數(shù)據(jù)——數(shù)據(jù)建?!P驮u(píng)估——模型應(yīng)用)

    20 理解業(yè)務(wù)和數(shù)據(jù):我們需要做好什么計(jì)劃?_嗶哩嗶哩_bilibili 目錄 ? 一、理解業(yè)務(wù)和數(shù)據(jù):我們需要做好什么計(jì)劃? 1.1兩個(gè)思想問(wèn)題 1.2為什么數(shù)據(jù)挖掘不是萬(wàn)能的 1.3業(yè)務(wù)背景與目標(biāo) 1.4把握數(shù)據(jù)? 1.5總結(jié) 二、 準(zhǔn)備數(shù)據(jù):如何處理出完整、干凈的數(shù)據(jù)? 2.1找到數(shù)據(jù) 2.2數(shù)據(jù)探索

    2024年02月05日
    瀏覽(28)
  • 實(shí)戰(zhàn)演練Python數(shù)據(jù)分析[pandas]

    實(shí)戰(zhàn)演練Python數(shù)據(jù)分析[pandas]

    本篇文章出自于《利用Python進(jìn)行數(shù)據(jù)分析》示例數(shù)據(jù) 請(qǐng)結(jié)合提供的示例數(shù)據(jù),分析代碼的功能,并進(jìn)行數(shù)據(jù)分析與可視化拓展。本篇文章通過(guò)四個(gè)例子,通過(guò)MoviesLens數(shù)據(jù)集、美國(guó)1880-2010年的嬰兒名字、美國(guó)農(nóng)業(yè)部視頻數(shù)據(jù)庫(kù)、2012年聯(lián)邦選舉委員會(huì)數(shù)據(jù)庫(kù)來(lái)進(jìn)行著重講解。

    2024年02月15日
    瀏覽(26)
  • 【Python練習(xí)】數(shù)據(jù)分析庫(kù)Pandas

    1. 了解Serie

    2024年02月09日
    瀏覽(39)
  • 【頭歌】——數(shù)據(jù)分析與實(shí)踐-python-Pandas 初體驗(yàn)-Pandas數(shù)據(jù)取值與選擇-Pandas進(jìn)階

    第1關(guān) 了解數(shù)據(jù)處理對(duì)象–Series 第2關(guān) 了解數(shù)據(jù)處理對(duì)象-DataFrame 第3關(guān) 讀取 CSV 格式數(shù)據(jù) 第4關(guān) 數(shù)據(jù)的基本操作——排序 第5關(guān) 數(shù)據(jù)的基本操作——?jiǎng)h除 第6關(guān) 數(shù)據(jù)的基本操作——算術(shù)運(yùn)算 第7關(guān) 數(shù)據(jù)的基本操作——去重 第8關(guān) 數(shù)據(jù)重塑 第1關(guān) Series數(shù)據(jù)選擇 第2關(guān) DataFrame數(shù)據(jù)

    2024年01月22日
    瀏覽(155)
  • python數(shù)據(jù)分析之Pandas庫(kù)(一)

    python數(shù)據(jù)分析之Pandas庫(kù)(一)

    Pandas有兩種常用的數(shù)據(jù)結(jié)構(gòu): Series (一維數(shù)據(jù))與 DataFrame(二維數(shù)據(jù))。 Series 是一種類似于 一維數(shù)組 的對(duì)象,能保存不同數(shù)據(jù)類型。 DataFrame 是一個(gè) 二維的表格型 的數(shù)據(jù)結(jié)構(gòu)。 1、初始化 使用一位列表初始化Series 2、索引[數(shù)據(jù)的行標(biāo)簽]、切片 1、初始化 2、查看數(shù)據(jù) 1、

    2024年02月09日
    瀏覽(23)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

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

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包