Search code examples
pythonkaggle

Kaggle notebook is not able to read the dataset


I'm trying to read a CSV file at kaggle platform, but I get the following error:

FileNotFoundError: [Errno 2] File b'../input/Salaries.csv' does not exist: b'../input/Salaries.csv'

This is my code:

import pandas as pd
sal = pd.read_csv('../input/Salaries.csv')

I can see the input window on the notebook's right side and the path and the file name matches the code.

Could somebody help me, please?


Solution

  • Solution:-

    import os
    print(os.listdir("../input"))
    

    It shows you what files you have available, which you can then copy-and-paste to the appropriate path.