剛剛接觸Python,目標用Python把數(shù)據(jù)導入QuickBI,做可視化分析。我用的是Mac,現(xiàn)在Mark我的入門。
首先下載anaconda,附官網(wǎng)鏈接不贅述。
https://www.continuum.io/downloads
進入anaconda界面
Method1: 點摁式
進入Jupyter,頁面將跳轉(zhuǎn)到瀏覽器。

image.png
進入頁面,創(chuàng)建NoteBook,就可以開始你的Python表演了~~><~~

image.png
Method2: cmd
進入黑窗(Win在開始搜索cmd),如下操作:
#cd-空格-放置py文件的文件夾位置(可以直接把文件夾拖進黑框)
cd /Users/joann/Untitled\ Folder
jupyter notebook
路徑查詢
import os
cwd = os.getcwd() # Get the current working directory (cwd)
files = os.listdir(cwd) # Get all the files in that directory
print("Files in '%s': %s" % (cwd, files))
把文件放在絕對路徑下,就可以直接讀取了
相對路徑,要把路徑寫進去,如下
df1 = pd.read_csv('0806.csv', 'r',encoding= u'gbk')
df2 = pd.read_table('//Users//name//Desktop//CDNOW_master.txt')
Python入門建議(來自于我貼心的小室友)
1-Python區(qū)分大小寫??!Shift+Enter執(zhí)行并新建下一行
2-先學習Numpy、pandas、數(shù)據(jù)加載存儲文件格式、數(shù)據(jù)整理、數(shù)據(jù)聚合與分組
3-多逛論壇,對比R,開源的資源很多

image.png
推薦幾個比較好的學習網(wǎng)站
1.廖雪峰大師:https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/
2.Python數(shù)據(jù)分析:http://www.itdecent.cn/u/22307cee1166
3.用Python做數(shù)據(jù)處理必看的12 個使效率倍增的Pandas技巧:http://blog.csdn.net/wy250229163/article/details/53504707
(內(nèi)附技術(shù)文檔鏈接)
4.用Python分析用戶消費行為:https://zhuanlan.zhihu.com/p/27910430
(綜合型的,學習分析的方法)
5.pyechars:https://github.com/chenjiandongx/pyecharts
(非常牛叉的畫圖,膜拜)