iT邦幫忙

DAY 21
1

用python擷取網頁上的開放資訊(數據資料),分析及畫出圖表系列 第 17

python抓網頁data,及做圖表之二十一:Pandas持續中…

如果我們必須藉助穆迪(Moody)或史坦普的信用評分來決定投資與否,不如將錢交給這兩家公司操作算了。

巴菲特

筆者理解為自己分析一手資料,並承擔後果。雖然目前往往是看別人分析的資料(想偷懶或其他藉口…),自己承擔苦果。

在官網上寫著,pandas可以解決那些問題?

What problem does pandas solve?

Python has long been great for data munging and preparation, but less so for data analysis and modeling. pandas helps fill this gap, enabling you to carry out your entire data analysis workflow in Python without having to switch to a more domain specific language like R.

Combined with the excellent IPython toolkit and other libraries, the environment for doing data analysis in Python excels in performance, productivity, and the ability to collaborate.

pandas does not implement significant modeling functionality outside of linear and panel regression; for this, look to statsmodels and scikit-learn. More work is still needed to make Python a first class statistical modeling environment, but we are well on our way toward that goal.

munging是割裂,意思是python被切割data和準備data比較強,和data建模型和分析比較弱,
pandas希望你多用它在這種用途,而不必用R.

搭配IPython環境,讓你做起資料分析非常有效率。

而pandas並沒有實作太多線性或平面回歸的功能,這方面需求,請改用另兩個工具,而不管如何,
python需要大量用於初步的統計環境,pandas會持續強化這部分功能。

而10分鐘學pandas裏,大概把它的強項,快速點出來。

型塑資料Object Creation,按需求的格式,來整理資料。
看資料Viewing Data,和SQL裏的view有點像。
玩資料時的選定Selection:簡單的挑出資料來做處理。
補上缺的資料Missing Data,收集的data有缺,或是…
**統計常用基礎計算Operations,**平均值,中位數,眾數…等
分組(Grouping)合併(Merge),SQL的統計功能,因為筆者常用SQL, 所以把網頁data轉入sqlite3的目的,就是方便用來排序,
統計函數,曾經也有想過,不用SQL,這些功能怎麼做呢?原來不用SQL,也是有解法。
把資料變型(Reshaping)
**樞鈕分析表格化data(Pivot Tables):**這可能就是筆者尋求的功能,
原來英文叫這個!!
日期時間序列,及時間格式的轉換
畫圖
讀寫檔案,可讀寫,CSV, HDF5(筆者沒用過),excel.


上一篇
python抓網頁data,及做圖表之二十:裝新版Pandas,及補充一些常識
下一篇
python抓網頁data,及做圖表之二十二:股價與獲利能力比較
系列文
用python擷取網頁上的開放資訊(數據資料),分析及畫出圖表22
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言