Sorry for asking a basic question, but I am learning Python on my own and appreciate if someone could help me understand this...
cframe = frame[frame.a.notnull()]
operating_system = np.where(cframe['a'].str.contains('Windows'), 'Windows', 'Not Windows')
by_tz_os = cframe.groupby(['tz', operating_system])
# Here I have a problem...
agg_counts = by_tz_os.size().unstack().fillna(0)
print(agg_counts[:10])
agg_counts2 = by_tz_os.count().unstack().fillna(0)
print(agg_counts2[:10])
I thought that the result of agg_counts2 (result2) will be the same as that of agg_counts (result1), but it is not.
I can not understand why and appreciate if anyone could help.