US Medical Insurance Portfolio Project Review :)

Hi there :smiley: This is my first project ever. It was super fun since I was the one created the goals and played around.
Thanks for taking your time and have a look :heart: all kind of review are much appreciated :heart_eyes:

Thank youuuuu & Have a great day!

Hi :slight_smile: This is my first review ever! :slight_smile:

You did a good job! The code you have written shows that you know how to handle strings, dictionaries and functions. The methods and approaches you used show that you have not only mastered the information from Data Science course, but also searched for additional information on the Internet.

I made some notes on how you could improve your code:

  1. The names of functions and parameters are descriptive, which is good practice. However, you might consider adding some comments to explain what each function does, what each parameter represents, and what the expected behavior is. For example, when you load the data it’s difficult to understand without context how your function works. As I understood, you wanted to convert the string values from the csv file into the appropriate numeric data type (int or float) if possible or leave them as strings if it’s categorical value. Your solution works, but in my opinion it’s a little bit complicated. You can look at an alternative solution and if you like it, try to use this code:
def load_csv_to_data_list(csv_file, data_list, data_name): with open(csv_file) as csv_data: csv_reader = csv.DictReader(csv_data) for row in csv_reader: try: value = float(row[data_name]) if value.is_integer(): data_list.append(int(value)) else: data_list.append(value) except ValueError: data_list.append(row[data_name])
  1. Chapter 1.3- View data. I think, in many cases the best way to work with data is not to look at the data :sweat_smile: I mean that your dictionary ‘Insurance_library’ is large and if you want to check how the data is stored you could just print first 3-5 values for ‘age’, 3-5 values for ‘sex’ etc. Otherwise, your list occupies most of the length of your document

  2. Function to find median. I think the first lines of your function are redundant. Instead of using a for loop (that creates the same list as data_list) you could just write one line: sorted_data = sorted(data_list).

  3. It would be great if you could summarize your findings in text form: write a conclusion, state your thoughts, and perhaps raise some questions for further analysis.

Congrats on completing the project! Keep it up!

Hi, thanks so much for the comments :laughing: I literally cry a tiny bit after receiving your feedback, which was detailed , thorough, and so helpful.

It takes me such a long time to complete this project for many reasons (but the main one I guess because I am not so good at this). Also, I tried to do more research on statistic, such as standard deviation, correlation coefficient…, and it seems more complicated for me at the moment. :sweat_smile:

I agreed all (4) points in your comments, and updated my project. :slightly_smiling_face: Many thanks again :heart:

I am looking over at the project your created now. It s very structured, easy to follow, great example for me to follow :smiley:

1 Like