I think learning Python is a process from shallow to deep, or learning anything is done in stages, and you will face different difficulties at different stages.
Let’s take my own process of learning to use Python for data analysis as an example to talk about the difficulties I encountered when learning Python at various stages.
first stage
It is to learn some basic mathematical knowledge, with the main content focusing on advanced mathematics, linear algebra and probability theory.
In fact, my idea is that if you want to be proficient in data analysis, it is not enough to just know how to program and process data. Basic mathematical knowledge is indispensable.
So at this stage, the difficulty I encountered was understanding some complex mathematical relationships and the derivation of mathematical formulas, such as partial derivatives of complex functions, the meaning of matrix eigenvectors, etc.
second stage
What I mainly study is the basics of Python programming. The learning contents include:
Python integrated development environment and virtual environment
Python variables, assignments, simple operations,
control statements and loop statements in Python, the
four major data structures in Python (lists, sets , dictionary, tuple)
Functions, classes, objects in Python (object-oriented programming)
Python reading and writing files Python exception handling
Because I have studied C++ and Java before, there is no particular difficulty in learning at this stage. However, for a novice (a novice who has never been exposed to programming before), it may be difficult to learn in object-oriented programming and the four major data structures. It's a little difficult. If there is no one around you to teach you, it is recommended that you follow the online resources to learn, which should help you avoid many pitfalls.
The third stage
Learn the commonly used third-party libraries for Python data analysis, the main ones are numpy, pandas, Matplotlib and SciPy. Let’s first introduce the functions of these libraries:
numpy: The biggest function of this library is large-scale matrix operations. It is rich in a large number of matrix operation functions, such as finding the inversion of a matrix, finding the eigenvalues of a matrix, and transforming a matrix. Setup and so on.
pandas: Pandas can import data from various file formats such as CSV, JSON, SQL, and Microsoft Excel. Pandas can perform operations on various data, such as merging, reshaping, selection, and data cleaning and data processing features. Matplotlib: It is a Python graphics library that allows users to easily graph data and provides a variety of output formats. Matplotlib can be used to draw various static, dynamic, and interactive charts. Matplotlib is a very powerful
Python drawing tool. We can use this tool to present a lot of data more intuitively in the form of charts. An example of Matplotlib drawing is as follows (the effect is quite good):
![](https://img-blog.csdnimg.cn/img_convert/36daabab7f6e3cad2a08682f10a7408d.webp?x-oss-process=image/format,png)
SciPy: I think SciPy is the core library for data analysis. It contains modules such as optimization, linear algebra, integration, interpolation, special functions, fast Fourier transform, signal processing and image processing, ordinary differential equation solving and other science and Calculations commonly used in engineering.
At this stage, I think the biggest difficulty is that these libraries cover a wide range, so there are many functions. If you want to write down the functions and functions of each library, it is impossible, unless your memory is really good. Very amazing. So what I do is to remember a few of the most commonly used functions, and then put their official documents in the browser's favorites. When necessary, go to the official documents to find relevant functions.
The fourth stage
I mainly combine some real data cases for practical operations. Here I recommend a data competition website kaggle (website link). There are many data cases on this website. These data cases often have actual requirements, and the data sets are all It can be downloaded locally. If you want to actually implement data analysis, you can go to this website to find the data you are interested in and try it yourself. This stage is actually the most difficult, because you need to implement data analysis without the guidance of others, but it may be difficult at the beginning. Once you do the analysis of a few more data cases, you will gradually get started.
Technical reserves about Python
Here I would like to share with you some free courses for everyone to learn. Below are screenshots of the courses. Scan the QR code at the bottom to get them all.
1. Python learning routes in all directions
2. Learning software
If a worker wants to do his job well, he must first sharpen his tools. The commonly used development software for learning Python is here, saving everyone a lot of time.
3. Study materials
4. Practical information
Practice is the only criterion for testing truth. The compressed packages here can help you improve your personal abilities in your spare time.
5. Video courses
Well, today’s sharing ends here. Happy time is always short. Friends who want to learn more courses, don’t worry, there are more surprises~