"""File mengyi_data.py:author: Michel Bierlaire, EPFL:date: First attempt to estimate a MDCEV model"""importosimportpandasaspdimportbiogeme.databaseasdbfrombiogeme.expressionsimportVariable
[docs]defread_data()->db.Database:"""Read the data from file"""# Get the directory of the current filemodule_dir=os.path.dirname(__file__)# Construct the path to the data filedata_file_path=os.path.join(module_dir,'data','mdcev.csv')# %%# Read the data.df=pd.read_csv(data_file_path,sep='\t')database=db.Database('mdcev',df)returndatabase