jupyter上用biogeme想做数据处理,在转换数据库时报错
import pandas as pd
import biogeme.database as db
import biogeme.biogeme as bio
import biogeme.models as models
from biogeme.expressions import Beta
#读取表格文件
fpath="D:/use/Info.xlsx"
df=pd.read_excel(fpath)
database=db.Database('Info',df)
biogemeError Traceback (most recent call last)
biogemeError: Column SCHEDULE in the database does contain object
Column ORIGAN in the database does contain object
Column DESTINATION in the database does contain object
Column S_TIME in the database does contain object
Column COST in the database does contain object
Column time_plane in the database does contain object
Column time_OT in the database does contain object
Column frequency_OT in the database does contain object
Column 数据录入人员 in the database does contain object
Column 数据来源 in the database does contain object
The database contains NaN value(s). Detect where they are using the function isnan()
本来以为是因为那些列有空白,填0以后还是这样
想解决这个报错,求指点
biogeme数据库只支持数值形式,把非数值列删除即可
报错内容发过来看看