self_example/TensorFlow_eaxmple/data_deal/热点图.py

13 lines
404 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from pylab import *
import pandas as pd
import matplotlib.pyplot as plot
datafile = pd.read_csv('E:\TensorFlow_eaxmple\dataset\某地降雨量.csv')
print(datafile)
'''计算求和平均等数据属性'''
summary=datafile.describe()
'''尚且存在问题NameError: name 'DataFrame' is not defined'''
corMat = pd.DataFrame(datafile.iloc[1:20,1:20].corr())
print(corMat)
plot.pcolor(corMat)
plot.show()