there is a pandas issue about the floor problem
the suggested way is
import pandas as pd
pd.to_datetime(df.date).dt.to_period('M').dt.to_timestamp()
there is a pandas issue about the floor problem
the suggested way is
import pandas as pd
pd.to_datetime(df.date).dt.to_period('M').dt.to_timestamp()