Python is a programming language developed by the Dutchman Guido van Rossum in 1991. Generally, as the scale of a program grows, the code becomes harder to read, but Python is a language that is easy for beginners to handle with the aim of eliminating such inconvenience. In addition, famous companies such as Google have also introduced it, and it can be said that it is a language that has been attracting attention in recent years. Python is commonly referred to as an object-oriented programming language. There are various definitions of object-oriented programming, but I interpret it as a method aimed at actively reusing code and shortening the total time required for system development.
・ Machine learning ・ Data analysis
There are many things you can do with Python, but here we will focus on machine learning and data analysis.
Machine learning is the clarification of these characteristics from a large amount of data and the prediction of the outcome of an event. Machine learning learning methods are classified into three types: supervised learning, unsupervised learning, and reinforcement learning. Supervised learning is machine learning in which the desired result is prepared in advance and how close the computer can predict the result. On the other hand, a learning method in which correct data is not prepared is called unsupervised learning. Unsupervised learning can be used to examine the correlation between two events. Reinforcement learning is a learning method that aims to maximize the rewards that can be obtained in situations where there are infinite behavior patterns. For example, a method is adopted in which rules such as shogi and go are input to a computer in advance, and when a choice that leads to a win is made, a reward is given accordingly and learning is performed.
Data analysis is the process of collecting and organizing data for some purpose to find valuable meaning. As a basic data analysis flow
As mentioned earlier, data analysis aims to find valuable meaning, so it is necessary to define what kind of results should be obtained for success.
There are roughly three ways to collect data. The easiest way is to use a dataset published by a public institution, which saves you time because someone else has already collected the data. The second method is to extract data from the in-house database. Knowledge of SQL is required to do this. The last is how to collect data by Web API (Application Programming Interface) and Web scraping. Web API is an interface between a server and a client that is called over a network using the HTTP protocol. Web scraping is a technology that acquires and downloads necessary data from a website, and the program that does it is called a scraper.
Even if the data is successfully collected, the data that lacks the answer to an item can adversely affect the overall result, so the data must be processed. In addition, it is necessary to convert character strings (categorical data) into continuous data so that statistical analysis is possible.
Visualization of data in Python can be achieved by using the following modules. When it comes to writing long code in Python, you'll need to split the file to reduce unexpected errors. The file divided at this time is called a module. ・ Matplotlib ・ Pandas ・ Seaborn etc.
・ Since the code is simple, it is suitable for beginners ・ Abundant libraries and frameworks
One of the features of Python is that the code is simple. Sure, I've been studying programming as a beginner, but I feel that the code is simpler and the functions can be implemented more easily than Javascript, for example. Javascript uses unique characters when defining constants and variables, but Python does not need to use such characters, it is defined by simply assigning a value to a variable. I will continue to cite Javascript to emphasize the simplicity of Python code.
script.js
const score = 60;
if(score >= 80){
console.log('good');
}else{
console.log('so so....');
}
script.py
score = 60
if score >= 80:
print('good')
else:
print('so so...')
As you can see, in python, indentation must be performed when using conditional branching, but it is simpler than other languages.
A framework is a pre-collection of frequently used programs. One of the strengths of Python is that using a framework allows you to develop quickly because you don't have to develop from scratch, which improves productivity. For example, Python frameworks include useful frameworks such as Django, Flask, and Bottle.
[Which one should I learn? Compare Python and JavaScript] (https://se.miyabikno-jobs.com/comparison-python-js/) [[Preserved version] I tried to summarize what you can do with Python, which is a hot topic now, so that even those who have no programming experience can understand it] (https://dividable.net/python/how-python-is-useful/) [What is Python? Easy-to-understand explanations for beginners from language features to learning methods] (https://www.sejuku.net/blog/7720) [[Python] Concept and writing of object-oriented programming] (https://www.headboost.jp/python-objective-paradigm/#4)
Recommended Posts