Context: I want to export a dataframe into an Excel spreadsheet. I want the Excel to have a separate, data-validated column in the workbook that only accepts values in the range 1 to 9 and is not included in the dataframe.
dataframe looks something like this:
name |
year |
trixie |
1985 |
timmy |
1990 |
chester |
1993 |
I want the exported excel sheet to look like this: where the code column only allows a number between 1 and 9 (the excel data validation way) I want to do all of this in python.
name |
year |
code |
trixie |
1985 |
|
timmy |
1990 |
|
chester |
1993 |
|