This is the module function, and some of the graphics
Install the module with the PIP Install command, if there is no need to add the scripts under the installation package to the path in the environment variable
Enter PIP install directly on the command line xx is installed online, suitable for the download package is not found
Pip install path \ module name. WHL can be installed download good
Download the URL of the package is Baidu LFD python
Only these are installed first
View installed modules with PIP list
EZ-Ghost is a drawing.
Pandas is a file operation, to open Excel, but also to install a xlrd
Pymysql is connected to MySQL
Worldcloud can draw a word cloud
Draw one of the simplest word clouds:
Import Wordcloud as WC
Import Matplotlib.pylab as PLB
Import OS
Import Jieba
From Wordcloud import Wordcloud,imagecolorgenerator
Import NumPy as NP
Fr=open (' handsome less. txt ', ' RB ')
data = Fr.read (). Decode (' Utf-8 ')
Font=r "C:\WINDOWS\Fonts\simhei.ttf"
MYWC=WC. Wordcloud (Collocations=false, Font_path=font). Generate (data)
Plb.imshow (MYWC)
Plb.show ()
Come in with a background:
From PIL import Image
im = Np.array (Image.open (cwd+ ' \\321.png '))
Imcolor = Imagecolorgenerator (IM)
Plus, this is the background.
Python Learning Note 4