First local project, help getting started

I feel like I’m missing some essential info and having trouble finding it within Codeacademy courses and online docs. I’ve made it up to this insurance project but having trouble getting started off platform. I looked at other people’s projects and still have questions would really appreciate some direction.

Fist, when I look at other people’s projects, they are able to list simply as ‘insurance.csv’ without some big long directory name…how are they able to do this? I thought I’d have to have the entire directory name.

Secondly, once I just get past importing csv, creating my lists, and then try to create my function to read and write my new lists, i get an error saying that csv is not defined. I was able to do some pandas commands to get it in and read it, but why doesn’t my jupyter notebook want to recognize the csv module??

I have attempted to upload the little that I have to my github for viewing:

Please help if this is a simple fix! If there is a course I need to do to better understand where I’m at and working off platform, please suggest. Thank you so much.

You can use normally use just insurance.csv if the file is in the same directory as the Python file you’re running. So you don’t have to use the full path, it can be a path relative to the current directory.

You can double check what directory Python considers the current working directory with-

import os
print(os.getcwd())  # getcwd: get current working directory

If it’s not the same directory as in which insurance.csv is located then you’ll need a more complex path.

I can’t see anything immediately wrong with the code but you’ll likely want to assign the result to something.

It might be a difficulty of working with Jupyter, I’d suggest running every cell from the top down again (there’s a button near the top for this purpose) to make sure the import is included. If the kernel is interrupted for any reason then it will likely forget any previous state (saved variables, imports etc etc.); it can be hard to keep track of what has and has not been run when you’re just getting started with notebooks (especially if the kernel dies unexpectedly).