I’m trying to save data in excel format but when I select the file menu and click “download as”, the option “excel sheet” doesn’t exist
Not following why you’d expect there to be such a thing and where? Are you using Jupyter somewhere online that says they have that? Are you using JupyterLab or the classic notebook? Not following what you mean as
file? Do you have panel data? Or are you expecting the notebook to have that option?
Most modules/packages in the standard, vanilla Jupyter ecosystem allow you to save panel data / data table as as comma-separated values (
.csv extension) or tab-separated values (
.tsv). Both those raw forms of data storage formats can be opened by spreadsheet software, such as Excel. For Pandas dataframes, there are additional packages you can install that will add engines that can be used to save the dataframes directly into Excel file format. At the very bottom of this notebook, under ‘Generating an Excel spreadsheet from a dataframe’, the last three code cells demonstrate using
engine='openpyxl' to output a dataframe as
.xlsx. Pandas even allows styling the dataframe in many ways, and using those engines some of those styles can even be saved in forms that retain the added styling in Excel, as discussed here.