Guided Project: Clean And Analyze Employee Exit Surveys 6

print(dete_resignations['dete_start_date'].value_counts().sort_index)

returns (sample)

1970-01-01 00:00:00.000002008    22
1970-01-01 00:00:00.000002007    21
1970-01-01 00:00:00.000002012    21
1970-01-01 00:00:00.000002010    17
1970-01-01 00:00:00.000002005    15
1970-01-01 00:00:00.000002004    14
1970-01-01 00:00:00.000002009    13

so my frustration is, how the heck do i look at a set of data points where the date is in a decimal, and they never changed the actual years months and days.

so i found out that earlier i was making a mess of negligence by avoiding .loc usage and my data got screwy.

2011.0    24
2008.0    22
2007.0    21
2012.0    21
2010.0    17
2005.0    15
2004.0    14
2009.0    13
2006.0    13
2013.0    10
2000.0     9
1999.0     8

so yeah, if ever there’s the “copy warning” mess, go up and start looking in past cells for situations where you could use .loc instead of creating copies of stuff by making new frames/variables.

1 Like