<commit_before>import pandas as pd
import numpy as np
from erlport.erlterms import Atom
from erlport.erlang import set_encoder

def setup_dtype():
    set_encoder(dtype_encoder)
    return Atom("ok")

def dtype_encoder(value):
    if isinstance(value, np.int64):
        return np.asscalar(value)
    elif isinstance(value, np.float64):
        return np.asscalar(value)<commit_msg>dataframe as tuple in jun py encoder<commit_after>import pandas as pd
import numpy as np
from erlport.erlterms import Atom
from erlport.erlang import set_encoder

def setup_dtype():
    set_encoder(dtype_encoder)
    return Atom("ok")

def dtype_encoder(value):
    if isinstance(value, np.int64):
        return np.asscalar(value)
    elif isinstance(value, np.float64):
        return np.asscalar(value)
    elif isinstance(value, pd.core.frame.DataFrame):
        return (Atom("pandas.core.frame.DataFrame"), value)
{'fraction_non_alphanumeric': 0.09222222222222222, 'fraction_numerical': 0.008888888888888889, 'mean_word_length': 4.148571428571429, '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': '1164901', 'n_tokens_mistral': 295, 'n_tokens_neox': 286, 'n_words': 77}