-1

I am trying to concatenate multiple csv files( all placed in one folder) in a pandas dataframe. When I use glob, I get an empty list. I am am not understanding why.

Here is my code

    import pandas as pd

    import glob

    path=r'C:\Users\ABC\Desktop'

    files=glob.glob(path+'/*.csv') **## the code returns files as an empty list.**

   print(files)
learning_python
  • 111
  • 2
  • 11

1 Answers1

1

Can you try with

path = 'C:\\Users\\ABC\\Desktop\\'
files = glob.glob(path+'*.csv')