out[ ]mozilla/ mozilla/ googlemaps/rochesterny opera/ test_internet_agent googleproducer mozilla/ blackberry nowsuppose you wanted to decompose the top time zones into windows and nonwindows users as simplificationlet' say that user is on windows if the string 'windowsis in the agent string since some of the agents are missingi'll exclude these from the datain [ ]cframe frame[frame notnull()we want to then compute value whether each row is windows or notin [ ]operating_system np where(cframe[' 'str contains('windows')'windows''not windows'in [ ]operating_system[: out[ ] windows not windows windows not windows windows namea thenyou can group the data by its time zone column and this new list of operating systemsin [ ]by_tz_os cframe groupby(['tz'operating_system]the group countsanalogous to the value_counts function abovecan be computed using size this result is then reshaped into table with unstackin [ ]agg_counts by_tz_os size(unstack(fillna( in [ ]agg_counts[: out[ ] tz africa/cairo africa/casablanca africa/ceuta africa/johannesburg africa/lusaka america/anchorage america/argentina/buenos_aires not windows windows introductory examples www it-ebooks info