Search code examples
pythonpandasdatetimeforecast

How to only get datetime without hours minutes and seconds python pandas


I am doing a forecast with FBProhpet and suddenly when I do the forecast, only the forecasted dates (ds) ate being displayed with hours minutes and seconds See pictures for more information.

Any ideas on how to fix that enter image description here


Solution

  • use:

    df['ds']=pd.to_datetime(df['ds'])
    df['ds']=df['ds'].dt.date