In [1]:
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import pandas as pd
plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签
plt.rcParams['axes.unicode_minus']=False #用来正常显示负号
#有中文出现的情况,需要u'内容'

df = pd.read_excel(u'imei_sim.xlsx',sheetname=u'换机数据', encoding = "gbk",index_col=1,header=1)
df.shape


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-e880c962ea6a> in <module>()
      6 #有中文出现的情况,需要u'内容'
      7 
----> 8 df = pd.read_excel(u'imei_sim.xlsx',sheetname=u'换机数据', encoding = "gbk",index_col=1,header=1)
      9 df.shape

/usr/local/lib/python2.7/dist-packages/pandas/io/excel.pyc in read_excel(io, sheetname, header, skiprows, skip_footer, index_col, names, parse_cols, parse_dates, date_parser, na_values, thousands, convert_float, has_index_names, converters, dtype, true_values, false_values, engine, squeeze, **kwds)
    198 
    199     if not isinstance(io, ExcelFile):
--> 200         io = ExcelFile(io, engine=engine)
    201 
    202     return io._parse_excel(

/usr/local/lib/python2.7/dist-packages/pandas/io/excel.pyc in __init__(self, io, **kwds)
    227     def __init__(self, io, **kwds):
    228 
--> 229         import xlrd  # throw an ImportError if we need to
    230 
    231         ver = tuple(map(int, xlrd.__VERSION__.split(".")[:2]))

ImportError: No module named xlrd

In [ ]: