Examining Job Dissatisfaction In Queensland Education Institutes

Hello,
This is the first guided project I’m sharing. I would especially appreciate feedback on text: I wasn’t sure which comments should be inside code cells with hashtags, and which should be in markdown cells.
The second topic I would appreciate feedback in is the error message that appears under the heading “Examining job dissatisfaction”: A value is trying to be set on a copy of a slice from a DataFrame. I spent probably half of my time on this project trying to get rid of errors like this. Usually the error message says to use .loc and the error will go away, but in this case it didn’t. I left it the way as it is because the code does run.

DataCleaning_ExitSurveys.ipynb (316.5 KB)

Click here to view the jupyter notebook file in a new tab

Hi @raeleighprice

Congrats on your project, it looks good however I would remove some of the prints specially those where you use .info() you can use it when you are working but when you are publishing it shouldn’t be there it’s a lot of text and the reader could get lost or bored. In the future I recommend you to study about dashboards and data presentations, that’s really important for us. Also more plots could be better, I’ll share this link it’s a website with good plots and the code to do them,

About the comments, I use hashtags to comment code that means, explaining a line like you did with this line agedf = pd.DataFrame(age_ordered, index=ageindex) #convert to dataframe, and markdown cells to do analysis or explain what I did.

To solve this A value is trying to be set on a copy of a slice from a DataFrame you simply have to use the method .copy() it will create a copy of the dataframe and it will solve this warning

Hope this helps and good luck on your journey

1 Like

Hi @alegiraldo666
This is really helpful; thanks for your detailed feedback.

I had tried the .copy() solution before but put it at the wrong place (at the end of the line). It works now, thanks.

combined_updated.loc[:, 'dissatisfied'].copy().fillna(value=False, inplace=True)

1 Like