日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

谷歌 colab_如何在Google Colab上使用熊猫分析

發(fā)布時間:2023/11/29 编程问答 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 谷歌 colab_如何在Google Colab上使用熊猫分析 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

谷歌 colab

Recently, pandas have come up with an amazing open-source library called pandas-profiling. Generally, EDA starts by df.describe(), df.info() and etc which to be done separately. Pandas_profiling extends the general data frame report using a single line of code: df.profile_report() which interactively describes the statistics, you can read it more here.

最近,熊貓想出了一個了不起的開源庫,叫做pandas-profiling。 通常,EDA從df.describe() , df.info()等開始,這需要分別進(jìn)行。 Pandas_profiling使用單行代碼df.profile_report()擴(kuò)展了通用數(shù)據(jù)框架報告,該代碼以交互方式描述了統(tǒng)計信息,您可以在此處內(nèi)容。

然而, pandas_profiling不能被直接用在Colab。 該代碼將導(dǎo)致錯誤,如下所示; (However, pandas_profiling cannot be straightforwardly used on Colab. The code will result in an error, as below;)

“concat() got an unexpected keyword argument ‘join axes“

This is because Google Colab comes with a pre-installed older version of Pandas-profiling (v1) and the join_axes function is deprecated in the installed Pandas version on Google Colab.

這是因為Google Colab隨附了預(yù)先安裝的Pandas分析(v1)的join_axes版本,而在Google Colab上已安裝的Pandas版本中不推薦使用join_axes函數(shù)。

Google Colab的兩個主要命令是: (The two main commands for Google Colab are:)

! pip install https://github.com/pandas-profiling/pandas-profiling/archive/master.zip
profile.to_notebook_iframe()

步驟:在Google Colab上安裝Pandas分析 (STEPS : Install Pandas Profiling on Google Colab)

  • Run the below command, you can visit the link on github.

    運(yùn)行以下命令,您可以訪問github上的鏈接

  • ! pip install https://github.com/pandas-profiling/pandas-profiling/archive/master.zip

    2. Restart the kernel

    2.重新啟動內(nèi)核

    3. Re-import the libraries

    3.重新導(dǎo)入庫

    image by Author圖片作者

    4. Import and read your data set

    4.導(dǎo)入和讀取您的數(shù)據(jù)集

    5. Define your profile report:

    5.定義您的個人資料報告:

    image by Author圖片作者

    6. However, profile.to_widgets() is not working properly as it is not yet fully supported on Google Colab, as below snapshot :

    6.但是, profile.to_widgets() 無法正常運(yùn)行,因為Google Colab尚未完全支持它,如下快照所示:

    image by Author圖片作者

    7. Instead, change to profile.to_notebook_iframe(), as below snapshot:

    7.而是改為profile.to_notebook_iframe() ,如下快照:

    image by Author圖片作者

    8. And here’s your output:

    8.這是您的輸出:

    Gif by AuthorGif作者

    9. Save your output file in html format: so you can share as a webpage

    9.將您的輸出文件保存為html格式:這樣您就可以作為網(wǎng)頁共享

    Image by Author圖片作者

    Pandas_profiling displays descriptive overview of the data sets, by showing the number of variables, observations, total missing cells, duplicate rows, memory used and the variable types. Then, it generates detailed analysis for each variable, class distributions, interactions, correlations, missing values, samples and duplicated rows, which you can observe by clicking each tab.

    Pandas_profiling通過顯示變量的數(shù)量,觀察值,丟失的單元格總數(shù),重復(fù)的行,使用的內(nèi)存和變量類型來顯示數(shù)據(jù)集的描述性概述。 然后,它為每個變量,類分布,相互作用,相關(guān)性,缺失值,樣本和重復(fù)行生成詳細(xì)分析,您可以通過單擊每個選項卡進(jìn)行觀察。

    I hope this will help you to play around with Pandas profiling.

    我希望這將幫助您進(jìn)行Pandas分析。

    Happy exploring!

    探索愉快!

    翻譯自: https://medium.com/python-in-plain-english/how-to-use-pandas-profiling-on-google-colab-e34f34ff1c9f

    谷歌 colab

    總結(jié)

    以上是生活随笔為你收集整理的谷歌 colab_如何在Google Colab上使用熊猫分析的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。