In [1]:
import os as os

In [2]:
os.getcwd()


Out[2]:
'C:\\Users\\Dell'

In [3]:
os.chdir('C:\\Users\\Dell\\Downloads\\mortDefault')

In [4]:
os.listdir()


Out[4]:
['mortDefault2000.csv',
 'mortDefault2001.csv',
 'mortDefault2002.csv',
 'mortDefault2003.csv',
 'mortDefault2004.csv',
 'mortDefault2005.csv',
 'mortDefault2006.csv',
 'mortDefault2007.csv',
 'mortDefault2008.csv',
 'mortDefault2009.csv']

In [5]:
import pandas as pd

In [6]:
filelist=os.listdir()

In [7]:
mortdefault = [pd.read_csv(i) for i in filelist]

In [11]:
type(mortdefault)


Out[11]:
list

In [27]:
mort11=pd.concat(mortdefault,ignore_index=True)

In [28]:
mort11.info()


<class 'pandas.core.frame.DataFrame'>
RangeIndex: 10000000 entries, 0 to 9999999
Data columns (total 6 columns):
creditScore    int64
houseAge       int64
yearsEmploy    int64
ccDebt         int64
year           int64
default        int64
dtypes: int64(6)
memory usage: 457.8 MB

In [ ]: