362人加入学习
(2人评价)
Python语言入门详解

Python语言入门详解

价格 免费

第一方库:开发者本人,团队

第二方库:标准库,phthon开源社区

第三方库:程序员积累的库,用于以后使用和分享(third party library)

[展开全文]

Software installation

安装包: Anaconda 

  1. dir:www.anaconda.com/download
  2. download Anaconda 5.2 for windows installer
  3. install Anaconda3 with the default setup.
  4. Skip "Install Microsoft VSCode" / we will use "pycharm" instead of  it
  5. update Anaconda
    • run "Anaconda Prompt"
    • software update by code:
      conda update conda
    • update software other packages by code:
      conda update --all

      Note: that's the best way to update the packages that released by the developer.  ( the relationship between packages has been maintained)

    • Exit Anaconda Prompt
    "Ctrl + Z" press "Enter"
    "exit" press "Enter"

 IDE: PyCharm

  1. dir: www.jetbrains.com/
  2. download pycharm-community 
  3. install "PyCharm community edition" with the default setup
  4. finish setup and Run Pycharm
  5. select " Do not import settings"
  6. " download featured plugins"-- not right now
  7. "Configure->Setting" before your new Project. 
  8. select"Change font size with Ctrl + Mouse Wheel" under Fonts -> Editor -> General.
  9. change Size to 24 and Font to "Fira Code" under Fonts -> Editor -> Font.
  10. select "Use console font instead of the default", change Font to Fira Code, Size to 20 under Fonts -> Editor -> Color Scheme -> Console Font.

Create New Project

  1. LC "Create new project"
  2. change the default location to your personal folder by drop-down the location folder button.-- easy to be found in the future. 
  3. Add Conda environment to Python Interpreter(解析器)
    • Drop-down the project interpreter, select "Existing interpreter"
    • select "Conda Environment"
    • find the "python.exe" under c:\Users\Lewin\Anaconda3\Tools\python.exe
    • select "Make available to all projects" and press OK.
  4. Press "Create" (if the windows firewall blocked, please try to run Pycharm as Administrator)
  5. waite files scanning to index (only the first time)
  6. RC your project"HelloPython"-> New-> Python File
  7. gives a name for your new python project. (Python file= project)

 

[展开全文]

高等级(接近自然语言)

机器语言-汇编语言-面向过程(C SQL)

面向对象(...语言具有互通性)

NLP(自然语言处理)

知识体系、库的学习、编程思想(算法,数据结构)

与Python互补的语言(C C++ Java  )可以了解工程上的知识

pandas excel pd

matplot 绘图 plt(matplotlib Gallary)

numpy

路径 /——\

data=pd.read_csv("",sep='\t')

print(data.columns)

r1=pd.dataframe(data.groupby['catagory'],['total'].sum()).sort_values('total',ascending=false)

r1.plot(kind='pie',subplots=true,figsize=(8,8))

plt.show()

_init_ 构造器  self=this

 

 

 

[展开全文]

programming language is a language that controls your computer

and all programming language are based on English.

[展开全文]

编程语言:

被编译器转换为CPU 指令(机器语言)

有编译型语言和解释型语言

编译型语言

产生目标文件(又称为应用程序)

将对应的机器语言保存在文件中

如: Java

解释型语言

不产生目标文件

编译器1行1行的运行程序

如: Python

 

语言的低高级:

语言越高级越符合人类的语言  

面向对象语言   {最高}  Python, Java

面向过程语言      |  

汇编语言             |

机器语言         {最低}

高级语言

互通性高(容易从1种转到另一种)

很容易明白意思

 

Python语言的优势:

适合人工智能(专注数学领域)

不用担心内存

简单易懂(基础知识的要求比别的编程语言要低)

 

提到的网站:

matplotlib gallery:

https://matplotlib.org/2.1.1/gallery/index.html

p.s. : 请大家看看有没有什么出错的地方 @Timothy @Everybody

[展开全文]