Sharing Guided Project: Clean and Analyze Employee Exit Surveys

Hello all,

My main concern is the SettingWithCopyWarning I get starting from Cell 30. I have tried using dataframe.copy() and .loc as suggested by the warning message but they do not work. From the result it seems the code worked as intended, but I’m still wondering what caused the issue.

Any other feedback is welcome too of course!

Thanks!

Basics.ipynb (161.0 KB)

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

1 Like

Hello @changni924 Congratulations on finishing the project, and thanks for sharing your project.

To avoid above warnings, you might need to create a copy after dropping missing values. The .dropna seems like it is not returning a deep copy.

# Drop columns with less than 500 non-null values
combined_updated = combined.dropna(thresh = 500, axis = 1).copy()
combined_updated.info()

Check out the following:

  1. Shallow Copy Vs Deep Copy