03 Python入门资料贴

2018年已经进入倒计时了,这一年,读写修行的订阅人数破千,这对于我来说还是很开心的。不知不觉我写了100篇推送,有的得到了热烈的反映,有的无人问津。我在其中思考着,究竟我想在这个平台分享什么?在岁末之际,我想选一些自己觉得有价值的文章,再分享给大家!

Pyhon是一个现在比较流行的计算机语言,可以进行数据的分析和可视化。

Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with itsinterpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

From

同时,在心理语言学中一些刺激呈现的程序,如Open Seasame是支持Ptyhon编辑来实现一些个性化需求的。另外,基于Python有一个自然语言处理的包,NLTK,可以用来实现一些如分词,句法分析等功能。正是后面两个功能吸引我在R语言之外学习Python。

这个资料贴分享一下这周我参加的workshop以及推荐的相关资源。这个工作坊有详细的教学材料,方便课后的复习。

同样,也方便有一定基础的同学,自己按照流程一步一步的完成练习,达到自学的目的。这个工作坊用的是Jupyter (IPython)Notebook的工作环境。

链接如下:

http://swcarpentry.github.io/python-novice-inflammation/

下面再分享一些学习资源,基本都是网页资源,方便学习。没有用国内的网络测试过,如果有不能打开的,请在留言栏回复我一下哦!

Python Tutorial

入门+进阶

资源一

http://omz-software.com/pythonista/docs/tutorial/

This tutorial introduces the reader informally to the basic concepts and features ofthe Python language and system. It helps to have a Python interpreter handy forhands-on experience, but all examples are self-contained, so the tutorial canbe read off-line as well.

资源二

https://www.python.org/doc/

官方网站,包含海量的学习资源,适合各类学习者。但是初学者注意不要被海量资源淹没了哈!

资源三

How to Think Like a Computer Scientist: Interactive Edition

http://interactivepython.org/courselib/static/thinkcspy/index.html

The goal of this book is to teach you to think like a computerscientist. This way of thinking combines some of the best features ofmathematics, engineering, and natural science.

Like mathematicians, computerscientists use formal languages to denote ideas (specifically computations).

Like engineers, they design things, assembling components into systems andevaluating tradeoffs among alternatives.

Like scientists, they observe thebehavior of complex systems, form hypotheses, and test predictions.

The single most important skill for a computer scientist isproblem solving. Problem solving means the ability to formulate problems, thinkcreatively about solutions, and express a solution clearly and accurately. As it turns out, the process of learning to program is an excellent opportunity topractice problem solving skills.

On one level, you will be learning to program, a useful skill byitself. On another level, you will use programming as a means to an end. As wego along, that end will become clearer.

这本书的理念很好哈。确实感觉到学习编程的最重要的能力就是解决问题。平时写代码出现问题后,主要是通过google,youtube等资源找答案,有时候找不到答案,就会反过来想我的问题是不是正确,有的时候换个角度,问题就容易解决了。我想这可能是非科班出身的人学习代码的普遍情况吧。

资料四

http://thepythonguru.com/

包含了入门和高级课程。

资料五

https://pythonspot.com/en/

非常丰富的一个tutorial,除了入门的讲解,还包含了可视化和网页制作。

Tutorials for Python libraries

与R语言一样,Python有很多自己的Libaries,它们就像是可以执行不同功能的小程序。

两个元老

Matplotlib

Matplotlib is the oldest and most widely-used Python library fordata visualization. It was created by neurobiologist John D. Hunter to plotdata of electrical activity in the brains of epilepsy patients, but today isused in a number of fields.

When analysts and data scientists use matplotlib, they’re usuallyusing it in tandem with other Python libraries. Matplotlib is designed to workwith NumPy, a numerical mathematics library and is a core part of the SciPystack—a group of scientific computing tools for Python.

NumPy

NumPy is a scientific computing library for Python. It offershigh-level mathematical functions and a multi-dimensional structure (know asndarray) for manipulating large data sets.

While NumPy on its own offers limited functions for data analysis,many other libraries that are key to analysis—such as SciPy, matplotlib, andpandas are heavily dependent on NumPy.

Pandas

Pandas is a Python library for data analysis. Started by WesMcKinney in 2008 out of a need for a powerful and flexible quantitative analysis tool, pandas has grown into one of the most popular Python libraries.It has an extremely active community of contributors.

Pandas is built on top of two core Python libraries—matplotlib fordata visualization and NumPy for mathematical operations. Pandas acts as awrapper over these libraries, allowing you to access many of matplotlib’s and NumPy’s methods with less code. For instance, pandas’ .plot() combines multiple matplotlib methods into a single method, enabling you to plot a chart in a few lines.

SciPy

SciPy is a Python library used for scientific computing and statistical analysis. It was created by Travis Oliphant, Eric Jones, and PearuPeterson in 2001 as part of the effort to create a complete scientific computing environment in Python. This environment is known as the SciPy stack,and includes NumPy, matplotlib, and pandas.

SciPy is most commonly used in academic fields such as earth science and astronomy, but data scientists might find its linear algebra module useful.

Although SciPy and NumPy are sometimes referred to interchangeably, they’re not the same. SciPy is a set of numerical operations built on top of NumPy’s ndarray.

In addition to the library and stack of tools, SciPy also refers tothe SciPy community and a group of conferences dedicated to scientific computing in Python—such as SciPy or EuroSciPy.

Seaborn

Seaborn is a Python visualization library for statistical plotting.It comes equipped with preset styles and color palettes so you can createcomplex, aesthetically pleasing charts with a few lines of code. It’s designed to work with NumPy and pandas data structures and to support statistical tasks completed in SciPy and stats models.

Seaborn is built on top of Python’s core visualization librarymatplotlib, but it’s meant to serve as a complement, not a replacement. In most cases, you’ll still use matplotlib for simple plotting, and you’ll need aknowledge of matplotlib to tweak Seaborn’s default plots.

More Seaborn Tutorial

https://www.datacamp.com/community/tutorials/seaborn-python-tutorial#gs.meLbPEY

https://seaborn.pydata.org/tutorial.html

Statsmodels

As its name implies, stats models is a Python library built specifically for statistics. Statsmodels is built on top of NumPy, SciPy, and matplotlib, but it contains more advanced functions for statistical testing and modeling that you won’t find in numerical libraries like NumPy or SciPy.

一个学习这些libraries的资源

https://community.modeanalytics.com/python/libraries/

欢迎关注和转发

欢迎关注“读写修行”!一个有货的学术公众号。在底部的菜单栏,我为您精选了公众号往期的精华文章!如果您在学英语,参加某个标准化考试(雅思,托福,GRE),您可以点开英语学习,里面有私藏写作高分词汇,阅读精华技巧,实用口语句型。不仅适合您备考,也适合您为即将到来的留学生活做准备。如果您是语言学研究者,您可以点开学术研究。我在这里分享了前沿的统计技术(R语言,Python入门),还有有计算文体学的演示。我会不定期更新,不会为了刷屏而更新没有货的文章。希望您保持关注,祝您阅读愉快!

  • 发表于:
  • 原文链接https://kuaibao.qq.com/s/20181201G0VEWB00?refer=cp_1026
  • 腾讯「云+社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 yunjia_community@tencent.com 删除。

扫码关注云+社区

领取腾讯云代金券