def file2histo(histo_filename, hist_obj):
    """ 

        Read the histogram in from a file with no header and two columns 

        :type histo_filename: str   
        :param histo_filename: path to the histogram text file with two columns, keep the energy dimensionless to avoid confusion.
    
        :type hist_obj: instance of the histo class
        :param hist_obj: contains all the info regarding the energy histogram of sites for a given material  
    
        :raises: One has to initialize the histogram object before calling this function.
        pandas could throw up if the file is not formatted correctly. Refer examples section in the documentation.
    
        :rtype: histogram object with the energies and their densities updated

        """
    import pandas as pd
    import numpy as np
    histo_temp = pd.read_csv(histo_filename, header=None, delim_whitespace=True
        )
    hist_obj.E = np.array(histo_temp[0])
    hist_obj.RhoE = np.array(histo_temp[1])
    hist_obj.name = histo_filename
    hist_obj.nbins = len(hist_obj.E)
    return hist_obj
