title: How to exclude date in Pandas Dataframe if not "end of month"
body: <p>I have the following dataset:</p>
  
  <pre><code>import datetime
  import pandas as pd
  
  df = pd.DataFrame({'PORTFOLIO': ['A', 'A', 'A', 'A','A', 'A', 'A', 'A','A', 'A','A', 'A', 'A', 'A'],
                 'DATE': ['28-02-2018','31-03-2018','30-04-2018','31-05-2018','30-06-2018','31-07-2018','31-08-2018',
                          '30-09-2018','31-10-2018','30-11-2018','31-12-2018','31-01-2019','28-02-2019','05-03-2019'],
                 'IRR': [.7, .8, .9, .4, .2, .3, .4, .9, .7, .8, .9, .4,.7, .8],
                 })
  df
  
     PORTFOLIO       DATE  IRR
  0          A 2018-02-28  0.7
  1          A 2018-03-31  0.8
  2          A 2018-04-30  0.9
  3          A 2018-05-31  0.4
  4          A 2018-06-30  0.2
  5          A 2018-07-31  0.3
  6          A 2018-08-31  0.4
  7          A 2018-09-30  0.9
  8          A 2018-10-31  0.7
  9          A 2018-11-30  0.8
  10         A 2018-12-31  0.9
  11         A 2019-01-31  0.4
  12         A 2019-02-28  0.7
  13         A 2019-05-03  0.8
  </code></pre>
  
  <p>s you might see, all the dates are "end of month", except for 05-03-2019. What I need is to drop a DATE-value if its not "end of month". </p>
  
  <p>My poor temperary solution is</p>
  
  <pre><code>df2=df[df.TODATE &lt; '2019-03-01']
  </code></pre>
  
  <p>which is not good as the code should be more general.</p>
  
  <p>How do I do that?</p>