Data sources for the National Bureau of Statistics website:
Specific method code:
Import PANDAS AS PD DF = PD. read_excel ( 'quanguojingji10nian.xls') # py now Excel spreadsheet with the code in a folder X = DF [ 'index'] # the first column of data read Print ( X) ; # About 'indicators into other column to column names, you can read the other columns'
result:
Results can be read out column x draw a straight line, pie, line library with matplotlib.pyplot