# Path: econtools/util/frametools.py
# def df_to_list(df: Union[list, pd.DataFrame]) -> list:
#     """ Turn rows of DataFrame to list of Series objects """
#     if isinstance(df, list):
#         return df
#     elif isinstance(df, pd.DataFrame):
#         return [b for a, b in df.iterrows()]
#     else:
#         raise ValueError


import argparse
import re
import warnings
import numpy as np
import pandas as pd
                    import sys
from datetime import datetime
from functools import wraps
from inspect import getfullargspec
from os.path import isfile, splitext
from typing import Optional, Callable, List, Tuple
from econtools.util.frametools import df_to_list




PICKLE_EXT = ('pkl', 'p')   # First is default for writing to pickle
HDF5_EXT = ('h5', 'hdf5')


def load_or_build(raw_filepath: str,

# Path: econtools/util/frametools.py
# def df_to_list(df: Union[list, pd.DataFrame]) -> list:
#     """ Turn rows of DataFrame to list of Series objects """
#     if isinstance(df, list):
#         return df
#     elif isinstance(df, pd.DataFrame):
#         return [b for a, b in df.iterrows()]
#     else:
#         raise ValueError


# Path: econtools/util/io.py
import argparse
import re
import warnings
import numpy as np
import pandas as pd
                    import sys
from datetime import datetime
from functools import wraps
from inspect import getfullargspec
from os.path import isfile, splitext
from typing import Optional, Callable, List, Tuple
from econtools.util.frametools import df_to_list





PICKLE_EXT = ('pkl', 'p')   # First is default for writing to pickle
HDF5_EXT = ('h5', 'hdf5')


def load_or_build(raw_filepath: str,

                  copydta: bool = False,