What I expected to happen:
Recall that we still have some columns left in the dataframe that we don’t need to complete our analysis. Use the DataFrame.dropna() method to drop any columns with less than 500 non null values.
Remember that you can drop columns with less than a certain number of non null values with the thresh parameter.
Assign the result to combined_updated
What actually happened:
TypeErrorTraceback (most recent call last)
<ipython-input-84-e3a4614c7e0f> in <module>()
----> 1 combined_updated = combined.dropna(thresh = 500, axis =1).copy()
/dataquest/system/env/python3/lib/python3.4/site-packages/pandas/core/series.py in dropna(self, axis, inplace, **kwargs)
2984 if kwargs:
2985 raise TypeError('dropna() got an unexpected keyword '
-> 2986 'argument "{0}"'.format(list(kwargs.keys())[0]))
2987
2988 axis = self._get_axis_number(axis or 0)
TypeError: dropna() got an unexpected keyword argument "thresh"
This means you basically copied the series dete_resignations['dissatisfied'] into dete_resignations_up.
What you should have done is simply dete_resignations_up = dete_resignations.copy(). This way, you are copying the dataframe and not the dissatisfied column.