def dos_line(f, ndos):
    """
        Parses density of states data from DOSCAR

        Parameters
        ----------
        f : file object
	    File object containing data in DOSCAR file
        ndos: int
		Number of lines in f to be parsed

        Returns
        -------
        data : list
		List of density of states data
        line_length : float
		Amount of column in each line

    """
    data = []
    line_length = []
    for n in range(ndos):
        line = next(f)
        if not line_length:
            line_length = len(line.split())

        if len(data) != len(line.split()):
            data = [[] for i in range(len(line.split()))]

        for i, element in enumerate(line.split()):
            data[i].append(float(element))

    return data, line_length