如何使用pd.read读取.xlsx

时间:2018-05-16 04:52:44

标签: python pandas pd

我正在尝试读取xlsx文件,但是当我运行代码时,我有下一个问题。有人可以建议我如何解决它!

import pandas as pd
import pickle
import numpy as np
import nltk
from nltk import word_tokenize
from nltk.corpus import stopwords
%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = [18.0, 8.0]
import re
import string


leyes = pd.read_pickle('C:\\Users\\diese\\OneDrive\\Documentos\\GitHub\\MCPP_diego_ramirez\\Proyectof\\leyes.xlsx')



 A load persistent id instruction was encountered,but no persistent_load function was specified.

1 个答案:

答案 0 :(得分:0)

试试read_excel

frame = pd.read_excel('filen.xlsx', engine='xlrd')