pigeon/data_load.py
def load_clean_excel(path, coltype, header=0, engine=None, sheet_name=0):
    """
    Load excel file, dropping fully empty columns
    :param path: String, path to the input file
    :param coltype: dictionary, set types of particular columns
    :param header: Int/Array, position of the beginning of dataframe
    :param engine: str, default None, openpyxl to support new excel formats
    :param sheet_name: str, int, list, or None, default 0, Sheet to be opened
    :return:
    """
    df = pd.read_excel(path, header=header, engine=engine, sheet_name=sheet_name, dtype=coltype)
    initial_count = len(df)

    # drop rows that are entirely empty
    df_clean = df.dropna(how='all')
    df_clean_count = len(df_clean)
    dropped = initial_count - df_clean_count

    print(f'Number of dropped empty rows: ${dropped}.')

    return df_clean

    Load excel file, dropping fully empty columns
    :param path: String, path to the input file
    :param coltype: dictionary, set types of particular columns
    :param header: Int/Array, position of the beginning of dataframe
    :param engine: str, default None, openpyxl to support new excel formats
    :param sheet_name: str, int, list, or None, default 0, Sheet to be opened
    :return:
    
Load excel file, dropping fully empty columns
Load excel file dropping fully empty columns
def load_clean_excel(path, coltype, header=0, engine=None, sheet_name=0):
    df = pd.read_excel(path, header=header, engine=engine, sheet_name=sheet_name, dtype=coltype)
    initial_count = len(df)
    df_clean = df.dropna(how='all')
    df_clean_count = len(df_clean)
    dropped = initial_count - df_clean_count
    print(f'Number of dropped empty rows: ${dropped}.')
    return df_clean
def load_clean_excel ( path , coltype , header = 0 , engine = None , sheet_name = 0 ) : df = pd . read_excel ( path , header = header , engine = engine , sheet_name = sheet_name , dtype = coltype ) initial_count = len ( df ) df_clean = df . dropna ( how = 'all' ) df_clean_count = len ( df_clean ) dropped = initial_count - df_clean_count print ( f'Number of dropped empty rows: ${dropped}.' ) return df_clean
Load excel file, dropping fully empty columns
Load excel file dropping fully empty columns
"""
    Load excel file, dropping fully empty columns
    :param path: String, path to the input file
    :param coltype: dictionary, set types of particular columns
    :param header: Int/Array, position of the beginning of dataframe
    :param engine: str, default None, openpyxl to support new excel formats
    :param sheet_name: str, int, list, or None, default 0, Sheet to be opened
    :return:
    """ # drop rows that are entirely empty
None
path
String, path to the input file
String path to the input file
coltype
dictionary, set types of particular columns
dictionary set types of particular columns
header
Int/Array, position of the beginning of dataframe
Int / Array position of the beginning of dataframe
engine
str, default None, openpyxl to support new excel formats
str default None openpyxl to support new excel formats
sheet_name
str, int, list, or None, default 0, Sheet to be opened
str int list or None default 0 Sheet to be opened