<commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
Column Output Module
"""

def columnOutput(queryResult):
    """
    Display the data in columns
    """

#   for line in queryResult:
#        print "{0:2s} {1:3s} {2:4s}".format([unicode(x) for x in line])<commit_msg>Implementing Column Output.<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
Column Output Module
"""

def columnOutput(queryResult, separator=' '):
    """
    Display the data in columns
    """

    # Finding width of columns
    size = [max([len(line[i]) for line in queryResult])
            for i in range(len(queryResult[0]))]
    # Generating format string
    string = (''.join(["%%-%ds%s"%(x, separator) for x in size]))[:-len(separator)]
    for line in queryResult:
        print string%tuple(line)
{'fraction_non_alphanumeric': 0.1745635910224439, 'fraction_numerical': 0.011221945137157107, 'mean_word_length': 3.2041884816753927, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2980870', 'n_tokens_mistral': 266, 'n_tokens_neox': 258, 'n_words': 70}