Mar-15-2018, 04:52 PM
I have a pandas dataframe that I'm trying to output as an excel file. The dataframe is called "output". The following command runs without issue for me directly in Pycharm.
Batch File Command
start C:\ProgramData\Anaconda3\python.exe -i mypythonfilepath %1
Now when this python file is run via this batch file, the resulting excel output drops the first row of my dataframe. Any ideas as to why this might be happening? The first row always gets dropped in this second scenario, even if I set my to_excel startrow = 0 or even change it up to output as a csv using the to_csv() function.
Any insight is much appreciated.
output.to_excel("myfilepath",index=False)I then have a windows batch file running this .py file via the Anaconda command prompt.
Batch File Command
start C:\ProgramData\Anaconda3\python.exe -i mypythonfilepath %1
Now when this python file is run via this batch file, the resulting excel output drops the first row of my dataframe. Any ideas as to why this might be happening? The first row always gets dropped in this second scenario, even if I set my to_excel startrow = 0 or even change it up to output as a csv using the to_csv() function.
Any insight is much appreciated.