Tento ler o arquivo com:
df_xlsx = pd.read_excel('dados/aluguel.xlsx') df_xlsx
já instalei o xlrd e openpyxl, mas continua dando o seguinte erro:
XLRDError Traceback (most recent call last) in ----> 1 df_xlsx = pd.read_excel('dados/aluguel.xlsx') 2 df_xlsx
~\anaconda3\envs\alura_pandas\lib\site-packages\pandas\util_decorators.py in wrapper(*args, **kwargs) 116 else: 117 kwargs[new_arg_name] = new_arg_value --> 118 return func(*args, **kwargs) 119 return wrapper 120 return _deprecate_kwarg
~\anaconda3\envs\alura_pandas\lib\site-packages\pandas\io\excel.py in read_excel(io, sheet_name, header, skiprows, skip_footer, index_col, names, usecols, parse_dates, date_parser, na_values, thousands, convert_float, converters, dtype, true_values, false_values, engine, squeeze, **kwds) 228 229 if not isinstance(io, ExcelFile): --> 230 io = ExcelFile(io, engine=engine) 231 232 return io._parse_excel(
~\anaconda3\envs\alura_pandas\lib\site-packages\pandas\io\excel.py in init(self, io, **kwds) 292 self.book = xlrd.open_workbook(file_contents=data) 293 elif isinstance(self._io, compat.string_types): --> 294 self.book = xlrd.open_workbook(self._io) 295 else: 296 raise ValueError('Must explicitly set engine if not passing in'
~\anaconda3\envs\alura_pandas\lib\site-packages\xlrd_init_.py in open_workbook(filename, logfile, verbosity, use_mmap, file_contents, encoding_override, formatting_info, on_demand, ragged_rows, ignore_workbook_corruption) 168 # files that xlrd can parse don't start with the expected signature. 169 if file_format and file_format != 'xls': --> 170 raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported') 171 172 bk = open_workbook_xls(
XLRDError: Excel xlsx file; not supported