I've created a script tool in ArcGIS Pro that asks the user to select a csv file, and then reads that csv file into a pandas DataFrame and performs some calculations. I'd like to be able to export a new csv file after the calculations are complete in the same folder as the input csv file.
For example, the user selects the input csv file from (C:\Users\Luis\GIS\input.csv). I'd like to export a new csv at the end of the script to (C:\Users\Luis\GIS\output.csv)
The parameter that reads in the user input is set up as follows:
input_csv = arcpy.GetParameterAsText(0)
The data type for this parameter is File is the Tool Properties in ArcGIS Pro.