Clean And Analyze Employee Exit Surveys [Step 5 my answer]

For use vectorized string methods to extract the year I did this:

cease_pattern = r'(?P<Month>[0-1][0-9]/)?(?P<Year>[1-2][0-9]{3})'
cease_years = dete_resignations['cease_date'].str.extract(cease_pattern,expand=True).copy()
cease_years['Year'] = cease_years['Year'].astype(float)


Add this to the dataframe:

For plot the values:
This result is not product of an error, this plot use science notation:

For plot the bar chart expected you should do this:
use this plt method:
plt.ticklabel_format(useOffset=False, axis='y')


Hi @vorunplz, are you asking a question? I am confused a bit by your post, can you clarify please? Thanks.

1 Like

I’m answer the question


Super cool that you marked your own message as the solution :sunglasses: