Python

作者: 已经不在简书了 | 来源:发表于2018-12-16 00:08 被阅读18次

    Why Python?

    学习 Python 是为了更好地解决问题,由于完善的社区、面向对象的高级编程语言更加强大、更加易用。Python 是动态类型语言,使用起来更加灵活。

    再者,目前 Python 在数据分析方面有多个强大的库支持,底层C实现让它跑起来速度也不差。


    How to Learn?

    1. 语法(1周)

    Python的语法比较有特色,由于之前接触过别的语言,上手起来不会难,要做的可能就是适应新的语法,Python 中也有些特别的,例如它的模块化逻辑、切片、列表推到式等,打算慢慢去了解,暂不做深究。

    2. 数据分析库(3周)

    经常被提到的数据分析包: Numpy, Pandas, MatplotLib.

    主要学习 Numpy,在此之前打算自己编程实现从低维到高维矩阵的各种运算,一来是为了理解矩阵运算逻辑(目前正在研究),二来是为了比较自己的实现和 Numpy 封装算法的优劣。

    3. 实战(不限期)

    选一些案例,但还是主要以生活中、工作中出现的问题求解为主,我认为这类问题的抽象能力比较重要,这也是提高学习能力的一个途径,与自己有关的问题才更值得花时间、更有兴趣去解决。

    另外一个就是爬虫,平常会用 Javascript 写一些简单的爬虫,逻辑是通过 HTTP 请求获取页面信息,再解析出数据,目前框架已经很成熟了。


    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,贵在坚持。

    相关文章

      网友评论

        本文标题:Python

        本文链接:https://www.haomeiwen.com/subject/jwbzhqtx.html