<commit_before>import sys
from PatchImporter import PatchImporter
from PatchSimple import PatchSimple
import wrapt

from log import *
from utils import *

class PatchPandas(PatchSimple):
    modulename = 'pandas'
    input_functions = ['read_csv', 'read_table', 'read_excel', 'read_hdf', 'read_pickle', 'read_stata']
    output_functions = ['DataFrame.to_csv']

    input_wrapper = create_wrapper(log_input, 0, 'pandas')
    output_wrapper = create_wrapper(log_output, 0, 'pandas')

class PatchMPL(PatchSimple):
    modulename = 'matplotlib.pyplot'

    input_functions = []
    output_functions = ['savefig']

    input_wrapper = create_wrapper(log_input, 0, 'matplotlib')
    output_wrapper = create_wrapper(log_output, 0, 'matplotlib')

class PatchNumpy(PatchSimple):
    modulename = 'numpy'

    input_functions = ['genfromtxt', 'loadtxt', 'load', 'fromfile']<commit_msg>Added all of the rest of the Pandas IO functions.<commit_after>import sys
from PatchImporter import PatchImporter
from PatchSimple import PatchSimple
import wrapt

from log import *
from utils import *

class PatchPandas(PatchSimple):
    modulename = 'pandas'
    input_functions = ['read_csv', 'read_table', 'read_excel', 'read_hdf', 'read_pickle',
        'read_stata', 'read_msgpack']

    output_functions = ['DataFrame.to_csv', 'DataFrame.to_excel', 'DataFrame.to_hdf',
        'DataFrame.to_msgpack', 'DataFrame.to_stata', 'DataFrame.to_pickle']

    output_functions = ['Panel.to_excel', 'Panel.to_hdf',
        'Panel.to_msgpack', 'Panel.to_pickle']

    output_functions += ['Series.to_csv', 'Series.to_hdf',
        'Series.to_msgpack', 'Series.to_pickle']

    input_wrapper = create_wrapper(log_input, 0, 'pandas')
    output_wrapper = create_wrapper(log_output, 0, 'pandas')

class PatchMPL(PatchSimple):
    modulename = 'matplotlib.pyplot'

    input_functions = []
    output_functions = ['savefig']

    input_wrapper = create_wrapper(log_input, 0, 'matplotlib')
    output_wrapper = create_wrapper(log_output, 0, 'matplotlib')

class PatchNumpy(PatchSimple):
    modulename = 'numpy'

    input_functions = ['genfromtxt', 'loadtxt', 'load', 'fromfile']
{'fraction_non_alphanumeric': 0.1215649743828598, 'fraction_numerical': 0.0037261294829995344, 'mean_word_length': 5.050704225352113, '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': '1520442', 'n_tokens_mistral': 746, 'n_tokens_neox': 712, 'n_words': 150}