<commit_before># -*- coding: utf-8 -*-
import os
import click
import logging
import pandas as pd

from sklearn.model_selection import train_test_split


@click.command()
@click.argument('input_filepath', type=click.Path(exists=True))
@click.argument('output_filepath', type=click.Path())
def main(input_filepath, output_filepath):
    project_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)
    raw = pd.read_csv(project_dir + '/data/raw/UCI_Credit_Card.csv')
    train, test = train_test_split(raw, test_size=0.3)
    train.to_csv(project_dir + '/data/interim/train.csv')
    test.to_csv(project_dir + '/data/interim/test.csv')
    logger = logging.getLogger(__name__)
    logger.info('making final data set from raw data')


if __name__ == '__main__':
    log_fmt = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
    logging.basicConfig(level=logging.INFO, format=log_fmt)

    # not used in this stub but often useful for finding various files
    

    main()
<commit_msg>Análise exploratória<commit_after># -*- coding: utf-8 -*-
import os
import click
import logging
import pandas as pd

from sklearn.model_selection import train_test_split


@click.command()
@click.argument('input_filepath', type=click.Path(exists=True))
@click.argument('output_filepath', type=click.Path())
def main(input_filepath, output_filepath):
    project_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)
    raw = pd.read_csv(project_dir + '/data/raw/UCI_Credit_Card.csv')
    train, test = train_test_split(raw, test_size=0.3)
    train.to_csv(project_dir + '/data/interim/train.csv', index=False)
    test.to_csv(project_dir + '/data/interim/test.csv', index=False)
    logger = logging.getLogger(__name__)
    logger.info('making final data set from raw data')


if __name__ == '__main__':
    log_fmt = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
    logging.basicConfig(level=logging.INFO, format=log_fmt)

    # not used in this stub but often useful for finding various files
    

    main()

{'fraction_non_alphanumeric': 0.1362077413032827, 'fraction_numerical': 0.002939735423811857, 'mean_word_length': 4.518918918918919, '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': '629259', 'n_tokens_mistral': 711, 'n_tokens_neox': 693, 'n_words': 147}