<commit_before>import pandas as pd
import os

dfile = "PureFull.xls"
path_file = os.path.dirname(__file__)
# print("path_file", path_file)

dppr_file = os.path.join(path_file, dfile)
# print(dppr_file)


class Data_parse(object):
    """
    Data_parse read the dppr_file to get_values properties from a component
    """

    def read_dppr(self, dppr_file):
        #self.dppr_data = pd.read_excel(dppr_file).head().set_index('Name').ix[:, 1:12]

        #self.dppr_data = pd.read_excel(dppr_file).set_index("Name").ix[:, 1:12]
        self.dppr_data = pd.read_excel(dppr_file).set_index("Name").ix[:, 1:12]
        # component_names = dppr_data.index.get_values()
        return self.dppr_data

    def selec_component(self, component):
        #self.name = str(component)
        self.name = component
        self.properties = self.read_dppr(dppr_file).loc[self.name]
        ## self.label = {self.name : self.properties}

        #print(self.properties.index)
        #print ('name = {0}'.format(self.name))
        #print ('acentric_factor = {0}'.format(self.properties['Omega']))
        #print ('critical_Temperature = {0}'.format(self.properties['Tc']))
        #print ('critical_Pressure = {0}'.format(self.properties['Pc']))
        #print ('compressibility_factor_Z = {0}'.format(self.properties['Zc']))
        #print(self.label.keys())
        #print(self.label.values())

        return self.name, self.properties

        def fun(self):
            pass




def show(component, properties_component):
    print('Component = {0}'.format(component))
    print('Acentric_factor = {0}'.format(properties_component[1]['Omega']))
    print('Critical_Temperature = {0} K'.format(properties_component[1]['Tc']))
    print('Critical_Pressure = {0} Bar'.format(properties_component[1]['Pc']))
    print('Critical_Volume = {0} cm3/mol'.format(properties_component[1]['Vc']))
    print('Compressibility_factor_Z = {0}'.format(properties_component[1]['Zc']))
<commit_msg>data sustance<commit_after>import pandas as pd
import os

dfile = "PureFull.xls"
path_file = os.path.dirname(__file__)
# print("path_file", path_file)

dppr_file = os.path.join(path_file, dfile)
# print(dppr_file)


class Data_parse(object):
    """
    Data_parse read the dppr_file to get_values properties from a component
    """

    def read_dppr(self, dppr_file):
        #self.dppr_data = pd.read_excel(dppr_file).head().set_index('Name').ix[:, 1:12]

        #self.dppr_data = pd.read_excel(dppr_file).set_index("Name").ix[:, 1:12]
        self.dppr_data = pd.read_excel(dppr_file).set_index("Name").ix[:, 1:12]
        # component_names = dppr_data.index.get_values()
        return self.dppr_data

    def selec_component(self, component):
        #self.name = str(component)
        self.name = component
        self.properties = self.read_dppr(dppr_file).loc[self.name]
        ## self.label = {self.name : self.properties}

        #print(self.properties.index)
        #print ('name = {0}'.format(self.name))
        #print ('acentric_factor = {0}'.format(self.properties['Omega']))
        #print ('critical_Temperature = {0}'.format(self.properties['Tc']))
        #print ('critical_Pressure = {0}'.format(self.properties['Pc']))
        #print ('compressibility_factor_Z = {0}'.format(self.properties['Zc']))
        #print(self.label.keys())
        #print(self.label.values())

        return self.name, self.properties





def show(component, properties_component):
    print('Component = {0}'.format(component))
    print('Acentric_factor = {0}'.format(properties_component[1]['Omega']))
    print('Critical_Temperature = {0} K'.format(properties_component[1]['Tc']))
    print('Critical_Pressure = {0} Bar'.format(properties_component[1]['Pc']))
    print('Critical_Volume = {0} cm3/mol'.format(properties_component[1]['Vc']))
    print('Compressibility_factor_Z = {0}'.format(properties_component[1]['Zc']))

{'fraction_non_alphanumeric': 0.16555783009211872, 'fraction_numerical': 0.01330603889457523, 'mean_word_length': 3.9669631512071155, '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': '597380', 'n_tokens_mistral': 1371, 'n_tokens_neox': 1320, 'n_words': 194}