Why Python源祈?
學(xué)習(xí) Python 是為了更好地解決問(wèn)題,由于完善的社區(qū)色迂、面向?qū)ο蟮母呒?jí)編程語(yǔ)言更加強(qiáng)大香缺、更加易用。Python 是動(dòng)態(tài)類型語(yǔ)言歇僧,使用起來(lái)更加靈活图张。
再者锋拖,目前 Python 在數(shù)據(jù)分析方面有多個(gè)強(qiáng)大的庫(kù)支持,底層C實(shí)現(xiàn)讓它跑起來(lái)速度也不差祸轮。
How to Learn兽埃?
1. 語(yǔ)法(1周)
Python的語(yǔ)法比較有特色,由于之前接觸過(guò)別的語(yǔ)言适袜,上手起來(lái)不會(huì)難柄错,要做的可能就是適應(yīng)新的語(yǔ)法,Python 中也有些特別的苦酱,例如它的模塊化邏輯售貌、切片、列表推到式等疫萤,打算慢慢去了解颂跨,暫不做深究。
2. 數(shù)據(jù)分析庫(kù)(3周)
經(jīng)常被提到的數(shù)據(jù)分析包: Numpy
, Pandas
, MatplotLib
.
主要學(xué)習(xí) Numpy
扯饶,在此之前打算自己編程實(shí)現(xiàn)從低維到高維矩陣的各種運(yùn)算恒削,一來(lái)是為了理解矩陣運(yùn)算邏輯(目前正在研究),二來(lái)是為了比較自己的實(shí)現(xiàn)和 Numpy
封裝算法的優(yōu)劣尾序。
3. 實(shí)戰(zhàn)(不限期)
選一些案例蔓同,但還是主要以生活中、工作中出現(xiàn)的問(wèn)題求解為主蹲诀,我認(rèn)為這類問(wèn)題的抽象能力比較重要,這也是提高學(xué)習(xí)能力的一個(gè)途徑弃揽,與自己有關(guān)的問(wèn)題才更值得花時(shí)間脯爪、更有興趣去解決。
另外一個(gè)就是爬蟲矿微,平常會(huì)用 Javascript
寫一些簡(jiǎn)單的爬蟲痕慢,邏輯是通過(guò) HTTP
請(qǐng)求獲取頁(yè)面信息,再解析出數(shù)據(jù)涌矢,目前框架已經(jīng)很成熟了掖举。
The Zen of Python
Python 2.7.10 (default, Aug 17 2018, 17:41:52)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
OK,貴在堅(jiān)持娜庇。