Notebook Issues - Read CSV

Hi @ChrisGM,

We here at the Losant Forums are happy to help with Losant Notebook problems surrounding accessing data and performing analysis. Our expertise lies in the Losant Platform, so we recommend checking out the Jupyter Blog, the Jupyter Live Chat, or posting on the Jupyter Discourse Forum for challenging problems within the Jupyter Notebook and help writing Notebook Code. In this case, it looks as though this snippet will cause some issues:

input_dir = os.path.join(os.environ[‘INPUT_DIR’])
dataset = pd.read_csv(input_dir, ‘data.csv’)

In this first line, you are not joining any values, which is likely resulting in this error; I will update the documentation to fix this snippet. I would recommend rewriting this to:

dataset = pd.read_csv(os.path.join(os.environ['INPUT_DIR'], 'data.csv'))

Please let me know if this does not provide a resolution,
Julia

1 Like