1. 程式人生 > 實用技巧 >"利用python進行資料分析"學習記錄01

"利用python進行資料分析"學習記錄01

"利用python進行資料分析"學習記錄

--day01 08/02

與書相關的資料在 http://github.com/wesm/pydata-book

pandas 的2名字來源是 pannel data

安裝python的包

  • conda install package_name
  • pip install package_name

更新python的包

  • conda update package_name
  • pip install --upgraade package_name

我覺得conda好用多了,能用conda絕對不用原生

jupyter

  • 程式碼輸入到In區,在按shift + enter
  • 輸出結果展現在out區

匯入約定

  • puthon 社群對一些常用模組進行了命名的約定

    • import numpy as np
      import matplotlib.pyplot as plt
      import pandas as pd
      import seaborn as sns
      import statsmodels as sm
      
    • 故np.arrange 是用的是NumPy中的arrange函式

虛擬碼

  • 類程式碼,事實上不是實際有效的原始碼

處理/處置/規整(munge/munging/wrangling)

  • 將非結構化的或者同時又很凌亂的資料整理成結構化、清晰形式的整個過程

內省

  • 直接在jupyter notebook 中的In [n]:行中打?、??
    • ?一個列印型別,兩個列印原始碼

munge

[ muhnj ]


verb (used with or without object), munged, mung·ing. Computer Slang.

to manipulate (raw data), especially to convert (data) from one format to another:the munging of HTML content.

grunge

[ gruhnj ]


noun Slang.

dirt; filth; rubbish.

something of inferior quality; trash:He didn't know good music from grunge.

a person who works hard, usually for meager rewards; grind.

a style or fashion derived from a movement in rock music: in fashion characterized by unkempt clothing and in music by aggressive, nihilistic songs.

wrangle

[ rang-guhl ]SHOW IPA


verb (used without object), wran·gled, wran·gling.

to argue or dispute, especially in a noisy or angry manner.

verb (used with object), wran·gled, wran·gling.

to argue or dispute.

to tend or round up (cattle, horses, or other livestock).

to obtain, often by contrivance or scheming; wangle:He wrangled a job through a friend.

noun

a noisy or angry dispute; altercation.

上文的wangling指的是通過權宜或計劃獲得

錯誤收集

In [1]:def add_number(a,b):

shift + enter

SyntaxError: unexpected EOF while parsing

EOF是一個計算機術語,為End Of File的縮寫,在作業系統中表示資料源無更多的資料可讀取。 資料源通常稱為檔案或串流。 通常在文字的最後存在此字元表示資料結束。

  • 沒有正經結尾