which version of numpy and pandas, and a question of swissmetro data

21 views
Skip to first unread message

lolonger yan

unread,
Nov 20, 2021, 9:32:21 AM11/20/21
to Biogeme
Dear Prof. Bierlaire,

I'm trying to install biogeme, but keep facing problems such like 
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-19-4ae824465138> in <module>() 1 # Removing some observations 2 exclude = ((PURPOSE != 1) * (PURPOSE != 3) + (CHOICE == 0)) > 0 ----> 3 database.remove(exclude) C:\Anaconda3\lib\site-packages\biogeme\database.py in remove(self, expression) 740 self.data[self.data[columnName] != 0].index, inplace=True 741 ) --> 742 self.data.drop(columns=[columnName], inplace=True) 743 744 def dumpOnFile(self): TypeError: drop() got an unexpected keyword argument 'columns'

I believe it's because I have the wrong version of pandas.
I looked up in the documents and the web, haven't found any information about which version of numpy/pandas/scipy the biogeme(3.2.8) depends on.


another question is that, I am looking at swissmetro data.
It seems that each respondent ID have 9 records and 3 options that is availabel. 
So, for each question, he/she should be facing three scenarios. 
But there is not a variable that indicates which 3 records belongs to each question.
How is that happen? 


I'm just a beginner for biogeme (but not for choice modeling), exuse me if the question is too simple. 
best regards.

Longxu from China

Bierlaire Michel

unread,
Nov 21, 2021, 1:46:08 AM11/21/21
to lolon...@gmail.com, Bierlaire Michel, Biogeme

On 20 Nov 2021, at 17:32, lolonger yan <lolon...@gmail.com> wrote:

Dear Prof. Bierlaire,

I'm trying to install biogeme, but keep facing problems such like 
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-19-4ae824465138> in <module>() 1 # Removing some observations 2 exclude = ((PURPOSE != 1) * (PURPOSE != 3) + (CHOICE == 0)) > 0 ----> 3 database.remove(exclude) C:\Anaconda3\lib\site-packages\biogeme\database.py in remove(self, expression) 740 self.data[self.data[columnName] != 0].index, inplace=True 741 ) --> 742 self.data.drop(columns=[columnName], inplace=True) 743 744 def dumpOnFile(self): TypeError: drop() got an unexpected keyword argument 'columns'

I believe it's because I have the wrong version of pandas.

Probably.

I looked up in the documents and the web, haven't found any information about which version of numpy/pandas/scipy the biogeme(3.2.8) depends on.

I am using pandas 1.3.0. 
It is probably better to install biogeme in a “clean” environment, where you install the latest version of pandas, in case you need the older one for other purposes.



another question is that, I am looking at swissmetro data.
It seems that each respondent ID have 9 records and 3 options that is availabel. 
So, for each question, he/she should be facing three scenarios. 

No. Each question is a choice among three alternatives.
And each respondent was exposed to nine questions.

But there is not a variable that indicates which 3 records belongs to each question.
How is that happen? 


I'm just a beginner for biogeme (but not for choice modeling), exuse me if the question is too simple. 
best regards.

Longxu from China


--
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/b0dfe7fa-2616-4c00-b9e1-619f870ab529n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages