title: How to apply IF, else, else if condition in Pandas DataFrame
body: <p>I have a column in my pandas DataFrame with country names. I want to apply different filters on the column using if-else conditions and have to add a new column on that DataFrame with those conditions. </p>
  
  <p> Current DataFrame:-</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Company Country
  BV  Denmark
  BV  Sweden
  DC  Norway
  BV  Germany
  BV  France
  DC  Croatia
  BV  Italy
  DC  Germany
  BV  Austria
  BV  Spain</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have tried this but in this, I have to define countries again and again.</p>
  
  <p><strong>bookings_d2.loc[(bookings_d2.Country== 'Denmark') | (bookings_d2.Country== 'Norway'), 'Country'] =  bookings_d2.Country</strong></p>
  
  <p>In R I am currently using if else condition like this, I want to implement this same thing in python.</p>
  
  <p><strong>R Code Example 1 :
  ifelse(bookings_d2$COUNTRY_NAME %in% c('Denmark','Germany','Norway','Sweden','France','Italy','Spain','Germany','Austria','Netherlands','Croatia','Belgium'),
                                as.character(bookings_d2$COUNTRY_NAME),'Others')</strong>
  <strong><br> <br> R Code Example 2 :
  ifelse(bookings_d2$country %in% c('Germany'),
                   ifelse(bookings_d2$BOOKING_BRAND %in% c('BV'),'Germany_BV','Germany_DC'),bookings_d2$country)</strong></p>
  
  <p>Expected DataFrame:-</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Company Country
  BV  Denmark
  BV  Sweden
  DC  Norway
  BV  Germany_BV
  BV  France
  DC  Croatia
  BV  Italy
  DC  Germany_DC
  BV  Others
  BV  Others</code></pre>
  </div>
  </div>
  </p>