In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what core libraries does Python have". In daily operation, I believe many people have doubts about what core libraries Python has. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "what core libraries does Python have?" Next, please follow the editor to study!
Core library
Python has three core data science libraries, and many others have been created on top of that. The three core data science libraries are:
Numpy
Scipy
Matplotlib
For simplicity, think of Numpy as the preferred array. Numpy arrays are different from standard Python lists in many ways, but there are a few things to keep in mind that Numpy arrays are faster, take up less space, and have more functionality than standard Python lists. However, it is also important to note that the size and type of these arrays are fixed and can be defined when the array is created. At the same time, it does not add new values indefinitely like a list.
On the basis of Numpy, Scipy provides many functions such as optimization, statistics and linear algebra processing. Although Numpy has similar features, I personally prefer the functionality of Scipy. Want to calculate the correlation coefficient or create some normal distribution data? Scipy is tailor-made for you.
Matplotlib may be inferior to other data science libraries, but it is the core library of drawings in Python. It is powerful and can be effectively controlled when needed.
Second generation library
The core library is great and commonly used. However, there are three second-generation libraries based on core libraries that provide more functionality and use less code.
If you've been studying data science and haven't heard of Scikit-learn, I have nothing to say. Scikit-learn is the machine learning library in Python. It has strong community support, archiving capabilities and a unified and easy-to-use API. The library focuses on "core" machine learning, including the regression, classification and clustering of structured data. But it can not be used for deep learning or Bayesian machine learning.
Pandas was created to simplify data analysis in Python. Pandas makes it very easy to load structured data, calculate statistics, and cut data. It is an indispensable tool in the stage of data mining and analysis. However, individuals do not recommend using Pandas during the data generation phase, as it usually does not scale well to large datasets. However, you can convert the Pandas code to the original Numpy array, which can significantly increase the speed of data production.
Although Matplotlib is not the most beautiful visualization, Seaborn can easily create beautiful visual data. Seaborn is based on Matplotlib, so you can still use the Matplotlib feature to add or edit Seaborn charts. It also makes it easier to create complex chart types. Take a look at the pictures below for some inspiration:
Deep learning
With the rapid development of deep learning, it is unwise not to mention the better Python packages in this field.
I am a big fan of Pytorch. If you want to start deep learning while learning the data science library, thus making very advanced deep learning algorithms relatively easy, then Pytorch is the best choice. Pytorch is gradually becoming a standard deep learning library for studying and implementing a large number of functions, making it more and more perfect in data generation use cases. These examples also provide many good getting started tutorials.
Personally, Keras is the first data science library that really makes deep learning within reach. You can create and train a deep learning model with 10 lines of code that are very easy to read and understand. But its disadvantage is that high-level abstraction is difficult to implement new research that Keras does not currently support (although they are constantly improving in this area). It also supports multiple backends, namely Tensorflow and CNTK.
Tensorflow is created by Google and provides strong support for the production of deep learning. Personally, the original version of Tensorflow was pretty clumsy, but they learned a lot, and Tensorflow 2.0 made the barriers to deep learning lower and lower. While Pytorch provides more production support for deep learning, Tensorflow greatly improves the usability of deep learning.
Statistics
I want to conclude the full text with two statistical model libraries in Python.
If you have used R, you may wonder why Scikit-learn did not give a p value when calculating the regression coefficient. If so, you need to take a look at statsmodels. Personally, statsmodels provides good support for statistical models and testing, and even a lot of R syntax.
Probabilistic programming and modeling are very interesting. If you are not familiar with this field, you can check out the hacker's Bayesian method, or you can use PyMC3. PyMC3 makes the defined probability model very intuitive and provides a lot of support for many advanced models.
Fly up
Before me, no one believed that there were many amazing data science libraries in Python. The purpose of this paper is to focus on the most basic data science database. With Python and these excellent data science libraries, you will be amazed at what you can achieve. I hope this article will be a good starting point for you to dabble in data science, and this is only the beginning of all the amazing data science libraries you are about to discover.
At this point, the study of "what are the core libraries of Python" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.