title: Python: Import excel file using relative path
body: <p>I tried to import an excel file which is not within the same folder than the script. I need to get one folder above, then into another folder (B_folder) and there is file 2_file.xlsx</p>
  
  <p>I tried:</p>
  
  <pre><code>df = pd.read_excel(r'..\B_folder\2_file.xlsx')
  </code></pre>
  
  <p>and got:</p>
  
  <pre><code>FileNotFoundError: [Errno 2] No such file or directory: '..\\B_folder\\2_file.xlsx'
  </code></pre>
  
  <p>also tried:</p>
  
  <ul>
  <li><p>foreslash instead of backslash</p></li>
  <li><p>without the 'r' before path</p></li>
  </ul>
  
  <p>but I always get the error message above or this one:</p>
  
  <pre><code>OSError: [Errno 22] Invalid argument: '..\\B_folder\2_file.xlsx'
  </code></pre>
  
  <p>what is wrong?</p>