я пишу парсер и данные нужно сохранить в xlxs файл, но при сохранении выводиться такая ошибка. Вот сам код:
df = pd.DataFrame({'имя': all_names,
'специализация': all_specialities,
'стаж': all_stage})
df.to_excel('/home/GorkiiOgurec/fl/pars_doctorov/names.xlsx')
При самом первом запуске все заработало, но уже при втором не заработало. Вот сама ошибка:
Traceback (most recent call last): File "/home/GorkiiOgurec/fl/pars_doctorov/parser_doc.py", line 30, in df = pd.DataFrame({ File "/home/GorkiiOgurec/.local/lib/python3.10/site-packages/pandas/core/frame.py", line 636, in init mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager) File "/home/GorkiiOgurec/.local/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 502, in dict_to_mgr return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy) File "/home/GorkiiOgurec/.local/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 120, in arrays_to_mgr index = _extract_index(arrays) File "/home/GorkiiOgurec/.local/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 674, in _extract_index raise ValueError("All arrays must be of the same length") ValueError: All arrays must be of the same length