def eventize(self, granularity):
        """ This splits the JSON information found at self.events into the
        several events. For this there are three different levels of time
        consuming actions: 1-soft, 2-medium and 3-hard.

        Level 1 provides events about commits
        Level 2 provides events about files
        Level 3 provides other events (not used so far)

        :param granularity: Levels of time consuming actions to calculate events
        :type granularity: integer

        :returns: Pandas dataframe with splitted events.
        :rtype: pandas.DataFrame
        """

        df_columns = {}
        # Init common columns
        self._init_common_fields(df_columns)

        # First level granularity
        df_columns[Git.COMMIT_ID] = []
        df_columns[Git.COMMIT_EVENT] = []
        df_columns[Git.COMMIT_DATE] = []
        df_columns[Git.COMMIT_OWNER] = []
        df_columns[Git.COMMIT_COMMITTER] = []
        df_columns[Git.COMMIT_COMMITTER_DATE] = []
        df_columns[Git.COMMIT_REPOSITORY] = []
        df_columns[Git.COMMIT_MESSAGE] = []
        df_columns[Git.COMMIT_NUM_FILES] = []
        df_columns[Git.COMMIT_ADDED_LINES] = []
        df_columns[Git.COMMIT_REMOVED_LINES] = []
        df_columns[Git.COMMIT_HASH] = []
        df_columns[Git.AUTHOR_DOMAIN] = []

        # Second level of granularity
        df_columns[Git.FILE_FILES] = []
        df_columns[Git.FILE_EVENT] = []
        df_columns[Git.FILE_PATH] = []
        df_columns[Git.FILE_ADDED_LINES] = []
        df_columns[Git.FILE_REMOVED_LINES] = []

        events = pandas.DataFrame()

        for item in self.items:
            commit_data = item["data"]
            if granularity == 1:
                self._add_common_fields(df_columns, item)
                self.__add_commit_info(df_columns, item)

                added_lines = 0
                removed_lines = 0
                files = commit_data["files"]
                df_columns[Git.COMMIT_NUM_FILES] = int(len(files))
                for f in files:
                    if "added" in f.keys() and f["added"] != "-":
                        added_lines = added_lines + int(f["added"])
                    if "removed" in f.keys() and f["removed"] != "-":
                        removed_lines = removed_lines + int(f["removed"])
                df_columns[Git.COMMIT_ADDED_LINES] = added_lines
                df_columns[Git.COMMIT_REMOVED_LINES] = removed_lines

            # TODO: this will fail if no files are found in a commit (eg: merge)
            if granularity == 2:
                # Add extra info about files actions, if there were any
                if "files" in commit_data.keys():
                    files = commit_data["files"]
                    nfiles = 0
                    for f in files:
                        if "action" in f.keys():
                            nfiles += 1

                    for f in files:
                        self._add_common_fields(df_columns, item)
                        self.__add_commit_info(df_columns, item)

                        df_columns[Git.FILE_FILES].append(nfiles)

                        if "action" in f.keys():
                            df_columns[Git.FILE_EVENT].append(Git.EVENT_FILE + f["action"])
                        else:
                            df_columns[Git.FILE_EVENT].append("-")

                        if "file" in f.keys():
                            df_columns[Git.FILE_PATH].append(f["file"])
                        else:
                            df_columns[Git.FILE_PATH].append("-")

                        if "added" in f.keys():
                            if f["added"] == "-":
                                df_columns[Git.FILE_ADDED_LINES].append(0)
                            else:
                                df_columns[Git.FILE_ADDED_LINES].append(int(f["added"]))
                        else:
                            df_columns[Git.FILE_ADDED_LINES].append(0)

                        if "removed" in f.keys():
                            if f["removed"] == "-":
                                df_columns[Git.FILE_REMOVED_LINES].append(0)
                            else:
                                df_columns[Git.FILE_REMOVED_LINES].append(int(f["removed"]))
                        else:
                            df_columns[Git.FILE_REMOVED_LINES].append(0)

                else:
                    print("Merge found, doing nothing...")

            if granularity == 3:
                # TDB
                pass

        # Done in this way to have an order (and not a direct cast)
        self._add_common_events(events, df_columns)

        events[Git.COMMIT_ID] = df_columns[Git.COMMIT_ID]
        events[Git.COMMIT_EVENT] = df_columns[Git.COMMIT_EVENT]
        events[Git.COMMIT_DATE] = df_columns[Git.COMMIT_DATE]
        events[Git.COMMIT_OWNER] = df_columns[Git.COMMIT_OWNER]
        events[Git.COMMIT_COMMITTER] = df_columns[Git.COMMIT_COMMITTER]
        events[Git.COMMIT_COMMITTER_DATE] = df_columns[Git.COMMIT_COMMITTER_DATE]
        events[Git.COMMIT_REPOSITORY] = df_columns[Git.COMMIT_REPOSITORY]
        events[Git.COMMIT_MESSAGE] = df_columns[Git.COMMIT_MESSAGE]
        events[Git.COMMIT_HASH] = df_columns[Git.COMMIT_HASH]
        events[Git.AUTHOR_DOMAIN] = df_columns[Git.AUTHOR_DOMAIN]

        if granularity == 1:
            events[Git.COMMIT_NUM_FILES] = df_columns[Git.COMMIT_NUM_FILES]
            events[Git.COMMIT_ADDED_LINES] = df_columns[Git.COMMIT_ADDED_LINES]
            events[Git.COMMIT_REMOVED_LINES] = df_columns[Git.COMMIT_REMOVED_LINES]
        if granularity == 2:
            events[Git.FILE_FILES] = df_columns[Git.FILE_FILES]
            events[Git.FILE_EVENT] = df_columns[Git.FILE_EVENT]
            events[Git.FILE_PATH] = df_columns[Git.FILE_PATH]
            events[Git.FILE_ADDED_LINES] = df_columns[Git.FILE_ADDED_LINES]
            events[Git.FILE_REMOVED_LINES] = df_columns[Git.FILE_REMOVED_LINES]

        return events