Python: read files from directory and concatenate that
<p>I have a folder <code>et</code> with <code>.csv</code> files and I try to read that and next concatenate that and get one file.
I try </p>

<pre><code>import os

path = 'et/'
for filename in os.listdir(path):
    et = open(filename)
    print et
</code></pre>

<p>but I get an error </p>

<pre><code>Traceback (most recent call last):
File "C:/Users/ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½/Desktop/projects/PMI/join et.py", line 5, in &lt;module&gt;
et = open(filename)
IOError: [Errno 2] No such file or directory: '0et.csv'
</code></pre>

<p>I can't understand, why I get this error, because when I 
<code>print filename</code>
I get</p>

<pre><code>0et.csv
1et.csv
2et.csv
3et.csv
4et.csv
5et.csv
6et.csv
7et.csv
8et.csv
</code></pre>

<p>Maybe it's the coding problem</p>

<p>You can try to add following code at the top of your code</p>

<pre><code># -*- coding: utf-8 -*-
</code></pre>

python pandas directory