Last answered:

16 Jan 2023

Posted on:

04 Nov 2022

0

Resolved: glob.glob function does not work

Tried uploading the YouTube Dataset folder into my Github directory, where I created the notebook.
Still produces an empty array.

Tried

files = glob.glob('youtube-dataset\*.csv')
files = glob.glob('youtube-dataset\\*.csv')

And they both failed.

image
image

3 answers ( 1 marked as helpful)
Instructor
Posted on:

04 Nov 2022

1

Hey Kasey,

Thank you for reaching out!

That is a bit strange. Could you please try

files = glob.glob('youtube-dataset/*.csv')

or

files = glob.glob('youtube-dataset//*.csv')

That is, try a forward slash instead of a black slash.

Kind regards,
365 Hristina

Posted on:

15 Jan 2023

0

Hi, Hristina. Mine got the same problem with Kasey.
My jupyter notebook is in the same folder with youtube-dataset and i tried both of your suggestion but gob function does not work and the output is only empty square brackets []

Instructor
Posted on:

16 Jan 2023

0

Hey Aina,

Thank you for reaching out!

Could you please provide a screenshot of both the folder and the code? Mine look as follows:
image.png

image.png

Kind regards,
365 Hristina

Submit an answer