How to prevent Dataframe.to_dict() to generate timestamps
Simply convert those columns to object type with .astype(str) before calling to_dict().
I am trying to use the python Dataframe to_dict() method without generating timestamps.
My problem: I have a dataframe with cells containing dates such as this: "2019-06-01". When I call the dataframe method "to-dict()" to generate a dictionnary, it converts the datevalue into something like: "Timestamp('2019-06-01 00:00:00')".
This is not what I would like. I would just like it to return a simple string such as: "2019-06-01"
Is it possible with optional parameters ?
Thank you