I have a record from a log-file that looks like the top part of the screenshot (with a few thousand rows) that I want to transform into a new record that looks like the lower part of the screenshot. In the actual record, for every user activity during a period of 1 year a row was created.
Actual Data and how it should look
In the new dataset, only one line should be created for each user. In addition to the User ID column, one column should then be created for each month of the investigation period (April 2015 to March 2016). This cell should have the value 1, if in this month the user had at least one activity out of the values listed in the "type" column (in this case "AppStart", "AppClose", or "Answer Question").
Further questions would be: - How do I have to customize the code so I can watch the events on a weekly basis (maybe I can do that myself if I have the code for the monthly basis)? - How can I add a column, in that the number of a specific event for one user in a specific time period is counted? (For example number of AppStarts in Mai 2015)
Thank you very much in advance! :-)
Aucun commentaire:
Enregistrer un commentaire