问题遇到的现象和发生背景
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以后还是这样
我想要达到的结果
想解决这个报错,求指点