title: PermissionError: Permission denied to reading CSV File in Python
body: <p>Simply I wanted to read the <strong>csv</strong> file that I converted from Data Frame after read the another csv file and same time I tried to remove header from in it.</p>
  
  <p>Then I got the error below one :</p>
  
  <pre><code>PermissionError: [Errno 13] Permission denied: 'X_Data.csv'
  </code></pre>
  
  <p>My python code :</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  df = pd.read_csv('input_doc.csv').replace(' ?', np.nan).dropna()
  
  data_X = df.iloc[:, 1:15].values 
  data_Y = df.iloc[:, :1].values 
  
  clean_X = pd.DataFrame(data_X);
  clean_Y = pd.DataFrame(data_Y);
  
  clean_X.to_csv("X_Data.csv", index=False)
  clean_Y.to_csv("Y_Data.csv", index=False)
  
  X = pd.read_csv("X_Data.csv", encoding="utf-8", header=1)
  Y = pd.read_csv("Y_Data.csv", encoding="utf-8", header=1)
  </code></pre>
  
  <p>Also I got the same error without removing header when reading.</p>
  
  <p>I found several issues that similar to my problem , but those won't fix my problem. </p>
  
  <p>I coded on Anaconda Spyder Editor in Windows 10. </p>
  
  <p>How can I read this file without getting this error? <strong>What am I missing?</strong></p>
  
  <p>Thank you so much! Any Help would be appreciated!</p>