You can extract the year from the pandas datetime object using the "dt" accessor and then subtracting it from the original datetime object. Here's an example:
main.py337 chars15 lines
This will output the following dataframe:
main.py105 chars5 lines
As you can see, the new "yearless_date" column contains the same dates as the original "date" column, but with the year stripped away.
gistlibby LogSnag