I was trying to convert a data frame to a CSV file using the to_csv() function. But I am getting the error "PermissionError: [Errno 13] Permission denied: 'lamda0.45.csv'". My code is as below:
agent_df.to_csv("lamda{}.csv".format(lamda),sep='\t', encoding='utf-8')
agent_df is my data frame and I need to identify a CSV file with a corresponding lambda value when used in a loop. NB: I am trying to save the file in the same folder as my program codes. Also, I don't have the same file open anywhere as suggested in these answers.