title: python pandas: remove part of date time object (datetime64[ns])
body: <p>I have a pandas dataframe , and I am trying to remove the day and time part of a date time column (i.e. only keep the year and month part). I did the following:</p>
  
  <pre><code>df['my_date_new'] = pd.to_datetime(df['my_date'].dt.year, df['my_date'].dt.month, 0)
  </code></pre>
  
  <p>but got the following error: <code>TypeError: invalid type comparison</code></p>
  
  <p>What did I do wrong here and how could I fix this?</p>