Error with dataframe append
<p>I'm trying to append each file's dataframe into a single master dataframe.  The final dataframe is blank, however.  I printed each before trying the append and the independent dataframes have data. </p>

<p>Code:</p>

<pre><code>import pandas as pd
import os

source_directory = r'H:\folder'

masterDF = pd.DataFrame()

for file in os.listdir(source_directory):
    if file.endswith(".xlsx") or file.endswith(".xls"):
        dataframe = pd.read_excel(source_directory + '\\' + file)
        print(dataframe)
        masterDF.append(dataframe)

print(masterDF)
</code></pre>

<p>Result:</p>

<pre><code>   Col_A  Col_B
0     46      5
1     56      4
2     45      4
3     45      4
4    455      5
5      4      4
6      4      5
7    544      4
   Col_A  Col_B
0     64      9
1      4     45
2      4     42
3     45      4
4     46      7
5     56     75
Empty DataFrame
Columns: []
Index: []
</code></pre>