First on:NOTE: Reprint please indicate the sourceMaking charts with MatplotlibTake the file as a variable and communicate with the OPENCV.Parsing images with OpenCV#-*-Coding:utf-8-*-from huai_zh import *from Mpl_toolkits.mplot3d import axes3dimport numpy as Npimport MATPLOTLIB.PYPL OT as Pltimport showimport cv2import osfrom matplotlib import pyplot as Pltimport numpy as Npfrom Mpl_toolkits.mplot3d Imp Ort axes3dfig = plt.figure () ax = axes3d (fig) x = Np.arange ( -4, 4, 0.25) Y = Np.arange (
Spit Groove Online Search a lot of matplotlib installation method (do not believe, you can try.) )I can only say, except too cumbersome, it is useless!If you are a python3.6.5 versionI give you the most correct advice :Open cmd directly, find pip with command pip install MatplotlibPIP helps you solve all the problems, do not believe you can try! (To help you install NumPy ...)Bo Master does not blow not black! Try it yourself!See a lot of either cumbersome or useless things also follow a few hou
column, the first figure.Plt.plot (y[:,0],'b', label="1st") Plt.plot (y[:,0],'ro') Plt.grid (True) Plt.axis ('Tight') Plt.xlabel ("Index") Plt.ylabel ('Values of 1st') Plt.title ("This is a double axis label") plt.legend (Loc=0) Plt.subplot ( 212) #determine the position of the first diagramPlt.plot (y[:,1],'g', label="2st") Plt.plot (y[:,1],'r*') Plt.ylabel ("Values of 2st") plt.legend (Loc=0) plt.show ()5. Draw two different graphs in two layers (straight-line cubic chart)ImportMat
Kernel original link: Https://www.kaggle.com/pmarcelino/comprehensive-data-exploration-with-python
The race is a return to the housing forecast.
Prologue: Life is the most difficult to understand the ego.
Kernel about four areas
1. Understanding the problem: in relation to the problem, study their significance and importance to each variable
2. Univariate Study: This competition is for target variables (projected house prices)
3. Multivariate analysis
Map () function in python and map function in python
Map () is a high-order function built in Python. It receives a function f and a list, and uses function f in turn on each element of the list, get a new list and return it.
For
The map in JS:Because the map() method is defined in JavaScript Array , we call Array the map() method, passing in our own function, and get a new Array result: function Pow (x) { return x * x;} var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];arr.map (POW); [1, 4, 9, 16, 25, 36, 49, 64, 81]var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];arr.map(String); // [‘1‘, ‘2‘, ‘3‘, ‘4‘,
0 reply content: There are actually many implementation methods. python is only one of them. Below I will introduce what I think is more convenient:
1. Excel VBA
Note: The following two templates are from http://ExcelPro.blog.sohu.com
(1) color selection of map of China by province
Below is:
The usage is also described in the figure.
: Excel template-color map
Reply content:In fact, there are a lot of implementations, Python is just one of them, let me introduce what I think is more convenient:
1. Excel VBA
Note: The following two templates are from
/ http
ExcelPro.blog.sohu.com
(1) Map of China to save color
Here are the following:
The use of the method is also described in the diagram
Download Address: Excel template-China
Python learning Mind Map, python mind guide
I accidentally encountered a Python learning Mind Map compiled by a great god. I feel very helpful for beginners to clarify their learning ideas. Thank you very much for your sharing.
See https://woaielf.github.io/2017/06/13/pyth
This article mainly introduces the usage of map, any, and all functions in python. The example analyzes the usage skills of map, any, and all functions, which has some reference value, for more information about map, any, and all functions in python, see the following exampl
map function:
Prototype: Map (function, sequence), which is to map a list to another list,
How to use:
def f (x):
Return x**2
L = Range (1,10)
Map (f,l)
OUT[3]: [1, 4, 9, +, BA] reduce function
Prototypes: Reduce (function, sequence, startvalue), which is to generalize a list into one output,How to use:
def f2 (x,y):
Python built-in function map/reduce/filter These three functions are handy, very cool.filter () function: The filter function is equivalent to filtering, calling a Bool_func (a method that returns only bool type data) to iterate through the elements in each sequence. Returns the sequence of elements that bool_func the result to true (note what the sequence means) http://blog.csdn.net/bolike/article/details/
Reprint: Learn to use yourselfA tool to learnPython languageRecommended to see Liaoche's Python3 tutorial.Data Analysis Python Basicssuch as List,tuple,dic,set and so on. My later blog will write.Two get dataPython crawlerRecommend a book: "Python Network data Collection" (Web scraping with Python) Ryan Mitchell wrote, very good. After reading this book + actual
approach is to use the ZIP function:
1 2 3) 4 5
>>> a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]>>> Zip (*a)[(1, 4, 7), (2, 5, 8), (3, 6, 9)]>>> Map (List,zip (*a))[[1, 4, 7], [2, 5, 8], [3, 6, 9]]
This method is faster but more difficult to understand, the list as a tuple decompression, just get our "Row and column swap" effect, and then by applying the list () function to each element, convert the tuple to listPython functio
This article mainly introduces the usage of map () and reduce () functions in Python. the code is based on Python2.x. For more information, see the next article () usage of functions and reduce () functions. the code is based on Python2.x. For more information, see
Python has built-in map () and reduce () functions.
I
This article mainly introduces the usage of map () and reduce () functions in Python. the code is based on Python2.x. if you need it, refer to the Python built-in map () and reduce () functions () function.
If you have read the famous Google paper "MapReduce: Simplified Data Processing on Large Clusters", you can unde
use the ZIP function:
1 2 3) 4 5
>>> a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]>>> Zip (*a)[(1, 4, 7), (2, 5, 8), (3, 6, 9)]>>> Map (List,zip (*a))[[1, 4, 7], [2, 5, 8], [3, 6, 9]]
This method is faster but more difficult to understand, the list as a tuple decompression, just get our "Row and column swap" effect, and then by applying the list () function to each element, convert the tuple to listPython functional Programming
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.