python - Define Pandas DataFrame as composite boolean condition -


I am trying to do this:

  data ['thing'] = Data ['a'] & gt; 0.75 and data ['B'] & gt; 0.5  

I can do this:

  dummy_1 = data ['A'] & gt; 0.75  

And I can do this:

  dummy -_2 = data ['b']> 0.5  
< P> But I can not do more.

Is a great way for people to handle it?

(Python 2.7.6, panda 0.13)

using a boolean Required

Data ['Object'] = (Data ['A']> 0.75) & amp; (Data ['B']> 0.5)


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -