introduction to PandasBiogeme

82 views
Skip to first unread message

Uthpalee Hewage

unread,
Jan 12, 2023, 11:34:52 AM1/12/23
to Biogeme
Hello,

I am Biogeme and python beginner. I tried running the code in " A short introduction to PandasBiogeme" and I keep getting  "FileNotFoundError" when I try run the code "df = pd . read_csv ( "swissmetro . dat" , "\ t ")
database = db . Database ("swissmetro" , df ).

I would be thankful for your support! 

Bierlaire Michel

unread,
Jan 12, 2023, 11:40:56 AM1/12/23
to uthpa...@gmail.com, Bierlaire Michel, Biogeme
The error message is self-explanatory. 


--
You received this message because you are subscribed to the Google Groups "Biogeme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeme+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/f52f715b-2a62-4f69-8c1b-91e417dbea54n%40googlegroups.com.

Swalha Salim

unread,
Jan 13, 2023, 4:37:36 AM1/13/23
to Biogeme
Prof, 

I also have the same error message. Please us first time users. 

Ahmad Reshad Ansar

unread,
Jan 16, 2023, 10:26:03 AM1/16/23
to Biogeme
please use this command to read excel or csv file
pandas = pd.read_excel('C:/.................../swissmetro.xlsx')
database = db.Database('C:/................./swissmetro.xlsx',pandas)

However, I am not sure you could run the code
from Headers import * 
cuz you will get the error [[ModuleNotFoundError: No module named 'headers']]

Fabiana Peixoto de Mello

unread,
Jan 16, 2023, 11:18:40 AM1/16/23
to Biogeme
If you do not post your entire code in readable form - visually as it shows in your code editor - it is not going to be possible to help you. In any case, the error you are reporting has to do with some module you are trying to import. I do not believe you even need this module to read the file.
Reply all
Reply to author
Forward
0 new messages